Transition Player from Guest to Provider
Last updated
Last updated
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.
Before we begin, ensure you have the following:
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 Authentication
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.
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.
You can also read our dedicated how-to for disconnecting an account here
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.
To learn more about account linking, you can read our documentation on connecting multiple providers to a player here