Authentication session

When a player successfully logs in, the Authentication service grants an access token for a specific duration.

The Authentication service automatically attempts to periodically refresh the player session. If refresh attempts fail before the expiration time, the session expires and raises the Expired event. Developers must handle this case and retry signing in for the player.

A player with an expired session remains signed in but is no longer authorized.

using Unity.Services.Authentication;

void CheckStates()
{
    Debug.Log($"Is SignedIn: {AuthenticationService.Instance.IsSignedIn}");
    Debug.Log($"Is Authorized: {AuthenticationService.Instance.IsAuthorized}");
    Debug.Log($"Is Expired: {AuthenticationService.Instance.IsExpired}");
}