Start a White Label Session

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.

// 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
});

Last updated