LootLocker
The BasicsGame SystemsContent ManagementPlayer Management
LootLocker
  • 📌The Basics
    • Getting Started
    • What is LootLocker?
    • Core Concepts
      • Players
      • Assets
      • Character Classes
      • API Types
      • Web Console
      • Stage & Live Environments
      • Glossary
    • Unity Quick Start
      • Install the SDK
      • Configure the SDK
      • Authenticate Your First Player
      • Update the SDK
    • Unreal Quick Start
      • Install & Configure the SDK
        • Older versions
      • Authenticate Your First Player
    • Godot Quick Start
      • Install the SDK
      • Configure the SDK
      • Authenticate Your First Player
      • Update the SDK
    • SDKs
    • Samples
      • Authentication Samples
      • Leaderboard Samples
      • Progression Samples
      • Player Samples
    • Launching Your Game
    • Support
      • Error Codes
      • Unreal Marketplace Plugin Support
  • 🎭Players
    • Overview
    • Authentication
      • How To
        • Guest Login
        • Steam
        • Apple
        • Apple Game Center
        • Google
        • Epic Games
        • PlayStation
        • Meta / Oculus
        • Xbox
        • Nintendo Switch
    • Files
      • How To
        • Manage Files in Web Console
        • Work with Files In-Game
    • Inventory
      • How To
        • Work with Player Inventory
    • Messages
      • How To
        • Configure Messages in Web Console
    • Names
      • How To
        • Work with Player Names
    • Player Manager
      • How To
        • Manage Players through Web Console
        • Manage Players In-Game
        • Use Player Operations
    • Unified Player Accounts
      • How To
        • Configure UPA in Web Console
        • Use Remote Login In-Game
        • Connect Identiy Provider to Player
        • External Provider Linking
        • Transition from Guest Login to Other Provider
        • Disconnect Identity Provider from Player
    • White Label Login
      • How To
        • Configure White Label Login
        • Create a New White Label User
        • Request User Verification
        • Handle Returning Users
        • Start a White Label Session
  • 🪙Commerce
    • Overview
    • Catalogs
      • How To
        • Configure Catalogs in LootLocker Console
        • List all Catalogs
        • Use Catalogs In-Game
        • Setup In-Game Store
    • Currencies
      • How To
        • Configure a Currency in Web Console
        • Use Currencies In-Game
    • DLC Management
      • How To
        • Configure DLC in Web Console
        • Use DLC In-Game
    • Entitlements
      • How To
        • Work with Entitlements In-Game
    • Real Money Purchases
      • How To
        • Configure In-App Purchase in Web Console
        • Make Purchases through Google Play Store
        • Make Purchases through Apple Store
        • Make Purchases through Steam Store
    • Virtual Purchases
    • Wallets
      • How To
        • Manage a Wallet in Web Console
        • Use Wallets In-Game
  • ⚔️Content
    • Overview
    • Assets
      • How To
        • Create & Configure an Asset
        • Organize & Search for Assets
        • Retrieve Assets In-Game
        • Set up Asset Storage Template
        • Check Grant Notifications
        • Set up a Game Config Asset
        • Create a Loot Box
        • Work with Loot Boxes In-Game
        • Create a Drop Table
        • Work with Drop Tables In-Game
        • Create a Rental Asset
        • Work with Rental Assets In-Game
    • User Generated Content (UGC)
      • How To
        • Create UGC In-Game
    • Twitch Drops
  • 🕹️Game Systems
    • Overview
    • Classes & Heroes
      • How To
        • Base Classes
        • Hero Classes
        • Implement Classes In-Game
        • Implement Heroes In-Game
    • Leaderboards
      • How To
        • Configure Leaderboard in Web Console
        • Use Player Leaderboards
        • Use Generic Leaderboards
        • Use Metadata to Store Additional Information
        • Use Scheduled Reset with Rewards
        • Use Leaderboards for Time Based Rankings
      • Leaderboard FAQ
      • GameMaker References
    • Feedback
      • How To
        • Manage Feedback Categories
        • Create Player Feedback
        • Create UGC Feedback
        • Create Game Feedback
        • View and Manage Feedback
    • Progressions
      • How To
        • Create a Progression
        • Game Progressions
        • Player Progressions
        • Class Progressions
        • Asset Instance Progressions
    • Triggers
      • How To
        • Setup a trigger in the Web Console
        • Invoke trigger from game
  • ⛓️Shared Systems
    • Overview
    • Metadata
      • How To
        • Add Metadata in Console
        • Fetch a Single Metadata In-Game
        • Fetch Metadata In-Game by Tags
        • Fetch Metadata In-Game from Multiple Sources
    • Notifications
      • How To
        • List Notifications and Mark as Read In-Game
  • 🗝️Admin
    • Settings
    • User Settings
    • Organization Settings
    • CORS Allowlist
  • ⭕️ Legacy
    • Deprecations
      • Unity SDK Deprecation Log
        • Version 2.1.5 - Migration to Open UPM
        • Version 2.0.0
      • Unreal SDK Deprecation Log
        • Version 4.0.0
        • Version 3.0.0
    • Legacy Storage
    • Legacy Triggers
      • Activate a trigger
      • Create a trigger
    • Legacy Progressions
      • Create a Progression System
      • Use a Progression System In-Game
Powered by GitBook
On this page
  1. Players
  2. White Label Login
  3. How To

Handle Returning Users

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 reuse 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:

// 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

This functionality is not yet implemented in the Godot SDK

curl -X POST "https://api.lootlocker.io/white-label-login/verify-session" \
  -H "domain-key: 11aaa11" \
  -H "is-development: true" \
  -H "Content-Type: application/json" \
  -d "{\"token\": \"afccd38d-09d5-48aa-8235-b9c4c9151596\", \"email\": \"test@lootlocker.io\"}"

Example response:

{
  "game_id": 2,
  "user_id": 406,
  "email": "test@lootlocker.io"
}

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.

Request Password Reset

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.

// 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 = "user@lootlocker.io";
LootLockerSDKManager.WhiteLabelRequestPassword(email, (response) =>
{
    if (!response.success)
    {
        Debug.Log("error requesting password reset");

        return;
    }

    Debug.Log("requested password reset successfully");
});

Input

You need to exchange the TriggerWhiteLabelResetPasswordevent 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.

curl -X POST "https://api.lootlocker.io/white-label-login/request-reset-password" \
  -H "domain-key: 11aaa11" \
  -H "is-development: true" \
  -H "Content-Type: application/json" \
  -d "{\"email\": \"test@lootlocker.io\"}"

This will return a 204 without a body response.

PreviousRequest User VerificationNextStart a White Label Session

Last updated 2 months ago

The page is hosted on LootLocker and will use the settings in for name and logo.

This requires that you have

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, .

🎭
Platform Settings
set up the Unreal SDK in your game.
look here
Blueprint example of password reset for a White Label User
Shows an example of how to implement password reset for a White Label user in Unreal Blueprints - see link: https://blueprintue.com/blueprint/zo03rut2/