White Label Login
Create a custom login screen where players register their username and email address for one or all of your games and register a session for them on the LootLocker backend.
White Label Login provides a way for you to have an email/password login not tied to any of the big platforms.
This is great for more advanced use cases, like making it possible for your players to sign in on your website with the same account they're using in the game.

This will be shown in emails sent to users as well as on the verify user/reset password page.
Shown as the sender in emails sent to users.
When users press reply in emails, this is the email used.
If this is enabled, new White Label accounts will have have to verify their account. An email will be sent to them when they sign up, with a verification link.
Only applies if Enable Account Verification is enabled. This will keep White Label users from starting LootLocker session until they have verified their account.
If Block Unverified Players is disabled, this will make sure unverified accounts cannot submit scores to leaderboards.
Logo is used in emails sent to users as well as on the verify user/reset password page.
When logging in with White Label a remember me option can be supplied. This value determines for how many days the session is valid for.
Before we can register a session in the game, a user must first be created.
Passwords must be at least 8 characters long.
Unity
Unreal
// Remember to use the LootLocker namespace in the top of your file.
using LootLocker.Requests;
// This code should be placed in a handler when user clicks the sign up button.
string email = "[email protected]";
string password = "password here";
LootLockerSDKManager.WhiteLabelSignUp(email, password, (response) =>
{
if (!response.success)
{
Debug.Log("error while creating user");
return;
}
Debug.Log("user created successfully");
});
Above is an example of how to implement White Label account creation using blueprints in Unreal Engine. For an example you can copy and paste into your editor, look here.
Input
You need to exchange the
TriggerWhiteLabelCreateAccount
event for whatever event you want to use to trigger the login flow.Remove the nodes
Replace: Input
with the email and password input from the user input in your game.Output
We recommend branching the completed events on the success flag, and if you do this you will probably want to add error handling in case the request fails as well as what (if any) continued actions you want on success.
White Label login works a little differently than other platforms in the sense that we first have to create a White Label login session, which is then used to create a game session. When the White Label Account is logged in the SDK will save the token and use it to create a Game Session.
The LootLocker SDKs provide a single method for the complete login flow. If you for some reason need to separate the steps, that is possible as well if you follow these instructions.
Unity
Unreal
// Remember to use the LootLocker namespace in the top of your file.
using LootLocker.Requests;
// This code should be placed in a handler when user clicks the login button.
string email = "[email protected]";
string password = "password here";
bool rememberMe = true;
LootLockerSDKManager.WhiteLabelLoginAndStartSession(email, password, rememberMe, response =>
{
if (!response.success)
{
if (!response.LoginResponse.success) {
Debug.Log("error while logging in");
} else if (!response.SessionResponse.success) {
Debug.Log("error while starting session");
}
return;
}
// Handle Returning Player
}, rememberMe);
Congratulations - you have now started using LootLocker in your game! Next up we suggest you look at our feature set and decide which ones you want to use in your game.
Above is an example of how to implement login and starting a game session with a White Label account using blueprints in Unreal Engine. For an example you can copy and paste into your editor, look here.
Input
You need to exchange the
TriggerLogin
event for whatever event you want to use to trigger the flow.Output
We recommend branching the completed events on the success flag, and if you do this you will probably want to add error handling in case the request fails as well as what (if any) continued actions you want on success.
For subsequent calls to different LootLocker methods you will want to create variables from the Player Id and Player Identifier outputs.
Since this method is behind the scenes a two step process, first login and then starting a game session, you can access the individual responses for debugging purposes using the LoginResponse and StartSessionResponse properties.
Congratulations - you have now started using LootLocker in your game! Next up we suggest you look at our feature set and decide which ones you want to use in your game.
We don't want a player to have to type in their email and password every time they start the game, so for this we can re-use the session token provided by the
WhiteLabelLogin
call multiple times.By default a session token is good for 24 hours, but if you send remember me to
true
a session will last for 30 days. Remember that these sessions are disconnected from the game session, so you still want to create a game session every time the player opens your game.The length of a remember session can be changed in platform settings for White Label Login.
When a player opens the game we first want to check if they have a previous session we can use:
Unity
Unreal
// Remember to use the LootLocker namespace in the top of your file.
using LootLocker.Requests;
LootLockerSDKManager.CheckWhiteLabelSession(response =>
{
if (response)
{
// Start a new session
Debug.Log("session is valid, you can start a game session");
}
else
{
// Show login form here
Debug.Log("session is NOT valid, we should show the login form");
}
});
This functionality is not yet implemented in the Unreal SDK
Depending on the response from this code we can either show the login form and ask for email and password again or we can start a game session.
If the user wants to reset their password we can use the following example to send them an email with a link to a reset password page.
Unity
Unreal
// Remember to use the LootLocker namespace in the top of your file.
using LootLocker.Requests;
// This code should be placed in a handler when user clicks reset password.
string email = "[email protected]";
LootLockerSDKManager.WhiteLabelRequestPassword(email, (response) =>
{
if (!response.success)
{
Debug.Log("error requesting password reset");
return;
}
Debug.Log("requested password reset successfully");
});
Above is an example of how to implement password reset for a White Label user using blueprints in Unreal Engine. For an example you can copy and paste into your editor, look here.
Input
You need to exchange the
TriggerWhiteLabelResetPassword
event for whatever event you want to use to trigger the login flow.You also need to replace the node
REPLACE: Input
with the users email usually collected from user input.Output
We recommend branching the completed events on the success flag, and if you do this you will probably want to add error handling in case the request fails as well as what (if any) continued actions you want on success.
If you want your White Label users to verify the provided emails then you can use the following example to do so. To use this however you need to have enabled account verification in the Platform Settings.
Unity
Unreal
// Remember to use the LootLocker namespace in the top of your file.
using LootLocker.Requests;
// This code should be placed in a handler when the user verifies their email.
int userId = 1234;
LootLockerSDKManager.WhiteLabelRequestVerification(userId, (response) =>
{
if (!response.success)
{
Debug.Log("error requesting account verification");
return;
}
Debug.Log("account verification requested successfully");
});
Above is an example of how to implement account verification for a White Label user using blueprints in Unreal Engine. For an example you can copy and paste into your editor, look here.
Input
You need to exchange the
TriggerWhiteLabelUserVerification
event for whatever event you want to use to trigger the login flow.You also need to replace the node
REPLACE: Input
with the users id.Output
We recommend branching the completed events on the success flag, and if you do this you will probably want to add error handling in case the request fails as well as what (if any) continued actions you want on success.
Congratulations - you have now started using LootLocker in your game with White Label Login! Next up we suggest you look at our feature set, and decide which ones you want to use in your game.
Last modified 2mo ago