Search Unity

Sign in with Apple Refresh Token

Discussion in 'iOS and tvOS' started by Tarrag, Jun 21, 2020.

  1. Tarrag

    Tarrag

    Joined:
    Nov 7, 2016
    Posts:
    215
    Hey friends,

    I'm working on iOS app.

    Is there a way to get a refresh token when using Sign in with apple Unity's asset as to avoid a user having to sign in everytime the user opens the app?

    Storing the user id (email=SignInWithApple.CallbackArgs.userInfo.userId) that previously signed up doesn't return credentialstate=Authorized for SignInWithAppleTest.cs GetCredentialState (but null) unless the user signs up/in in the current session:
    Code (CSharp):
    1. var siwa = gameObject.GetComponent<SignInWithApple>();
    2.         siwa.GetCredentialState(thisUSer, OnCredentialState);
    I could only find this reference of a similar asset to Unity's that said in January2020 it can't be done.

    If the answer is no, my best guess is that I need to implement the process end-to-end with REST API, if you think I may be going down the wrong route please guide me.

    Cheers, Sergio
     
  2. Whitmire

    Whitmire

    Joined:
    Apr 11, 2017
    Posts:
    2
    Having the same problem about having to sign in every time you open the app. @Tarrag What did you end up doing?
     
  3. Tarrag

    Tarrag

    Joined:
    Nov 7, 2016
    Posts:
    215
  4. lupidan

    lupidan

    Joined:
    Jan 14, 2014
    Posts:
    47