How Unity Authentication works
When a player signs in to your app, Unity Authentication generates the following tokens and ID:
- A
PlayerID
(a random alphanumeric string of 28 characters): used to identify returning and new players on different devices and external providers. - A session token: used to re-authenticate the user after the session expires.
- An access token: used to identify and authenticate the player to other Unity services.
You can learn more about these tokens and how to manage them under Cached players and session management.
The tokens and the PlayerID
allow Unity products and Unity games to capture player information during authentication. They enable:
- A means to identify a player and store player game data (for example, saving game state and recording in-app purchases).
- Consistent game experiences to the player (for example, points for leaderboards and suggested in-app purchases).
- Insight about the player’s game behavior across multiple devices.
- Multiplayer features on various platforms.
Signing in can be done via anonymous sign-in, or using external identity providers. Please refer to the page on identity providers for more details.