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
  • Prerequisites
  • Transitioning a Player
  • Conclusion
  1. Players
  2. Unified Player Accounts
  3. How To

Transition from Guest Login to Other Provider

PreviousExternal Provider LinkingNextDisconnect Identity Provider from Player

Last updated 28 days ago

In this how-to, we'll explain how to transition a player from a guest account to another provider.

A common flow in games is to get the player started playing as quickly as possible, and then later transition them to a more permanent authentication type, which also allows them to easily authenticate on other devices, We achieve this by starting them out with a guest account, which requires no input from the player, and then later nudging them to link their account with a different provider, like Apple or Google.

Prerequisites

Before we begin, ensure you have the following:

Transitioning a Player

To start transitioning the player from guest to another provider, we first need to authenticate the player with the new provider. This will give us the necessary token to connect the accounts.

In this example we'll use Apple sign in, but you can exchange this with another provider.

For more in depth information on how to authenticate with different providers, read our documentation on

Note that we don't start actually start a LootLocker game session using the new provider, we only do the local authentication with Apple to get the required token.

// The token retrieved from authenticating with Apple in the game client
string token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.0.xxxxx.xxxxxxxx-xxxxxxxxxxxxx";
LootLockerSDKManager.ConnectAppleAccount(token, (response) =>
{
    if(!response.success)
    {
        Debug.Log("Error connecting Apple");
        return;
    }

    Debug.Log("Successfully connected Apple");
});

Specific reference for providers are here:

The following example is for Apple:

curl -X PUT "https://api.lootlocker.io/game/v1/connected-accounts" \
    -H "x-session-token: your_token_here" \
    -H "Content-Type: application/json" \
    -d '{"authorization_code": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.0.xxxxx.xxxxxxxx-xxxxxxxxxxxxx"}'

After connecting the account, we can then disconnect the guest account. If we do not do this, the player will still be able to log in as a guest, which might not be what we want.

// The following providers are supported:
// LootLocker.LootLockerEnums.LootLockerAccountProvider.guest;
// LootLocker.LootLockerEnums.LootLockerAccountProvider.google;
// LootLocker.LootLockerEnums.LootLockerAccountProvider.apple;

var account = LootLocker.LootLockerEnums.LootLockerAccountProvider.guest;

LootLockerSDKManager.DisconnectAccount(account, (response) =>
{
    if(!response.success)
    {
        Debug.Log("Could not disconnect account");
        return;
    }

    Debug.Log("Successfully disconnected account");
});
curl -X DELETE "https://api.lootlocker.io/game/v1/connected-accounts/apple" \
    -H "x-session-token: your_token_here"

Conclusion

By following this how-to guide, you should now have a better understanding of how to transition a player from a guest account to another provider.

The reference documentation for this call can be found

You can also read our dedicated how-to for disconnecting an account

To learn more about account linking, you can read our documentation on connecting multiple providers to a player

🎭
Apple
Google
here
here
here
A game created in the LootLocker web console
UPA configured in the LootLocker web console
A player with a guest account
Authentication
Blueprint example of connecting Apple account
Blueprint example of disconnecting Apple account