Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Need help with Sing In with Unity.

Discussion in 'Unity Gaming Services General Discussion' started by VentaGames, Aug 9, 2023.

  1. VentaGames

    VentaGames

    Joined:
    Jul 9, 2021
    Posts:
    122
    Hi there,

    I followed the example, provided by Unity, all works just fine, but...
    Every time I call (on every app start)
    Code (CSharp):
    1. PlayerAccountService.Instance.StartSignInAsync()
    it brings up the Sign-In screen.
    But it is possible to store the session or keep the AccessToken locally, so the next app start will sign in the user silently?
     
  2. VentaGames

    VentaGames

    Joined:
    Jul 9, 2021
    Posts:
    122
    Never mind, just figured it out myself.

    I've stored the access token, and on the next run just feed it to
    AuthenticationService.Instance.SignInWithUnityAsync, and it worked.