Search Unity

Question Link anonymous account with other credentials

Discussion in 'Authentication' started by aixa1, Oct 23, 2021.

  1. aixa1

    aixa1

    Joined:
    Aug 4, 2021
    Posts:
    2
    Hi,

    I have current flow in my game:
    1. User logs into the game with anonymous account on device A
    2. Makes some progress on device A
    3. User logs with platform specific provider (i.e Apple sign in) and links the account.
    4. User logs into the game with anonymous account on device B
    5. Makes some progress on device B
    6. User logs with platform specific provider (i.e Apple Sign In) and tries to link the account.
    7. Game displays both players progress and user can pick with what account they want to continue
    Based on the API LinkWithAppleAsync method will return exception AuthenticationErrorCodes.AccountAlreadyLinked
    Will LinkWithAppleAsync also returns the other credentials to fetch data from cloud save?
    Currently I also can't see Unlink method. Will it be possible to unlink the platform specific authentication, so you can connect it with new account?
    What would be the best way to achieve such flow?
     
    Holmes555 and Dasp like this.
  2. unity_Ctri

    unity_Ctri

    Unity Technologies

    Joined:
    Oct 20, 2020
    Posts:
    81
    Hey Aixa,

    Excellent use case, thanks :)
    I don't know the answer off the top of my head so I'll do a little digging to see what's possible with the current builds.
     
    aixa likes this.
  3. avnishb_unity

    avnishb_unity

    Unity Technologies

    Joined:
    Oct 6, 2021
    Posts:
    9
    Hi Aixa -

    I'm on the Authentication team, nice to meet you!

    I'd like to confirm understanding of the use case you have. How I'm reading it is that the player is playing the game on two different devices:
    • Player updated their first device from Anonymous to Apple ID (say it's their iPhone).
    • Now on their second device (iPad), they started anonymous and want to link to their Apple ID.
    • User is further along in this iPad version and want this to be their primary account.
    • Alternatively, user was further along on their iPhone and wants to continue progress from their on their iPad.
    The feature would be to let the user select which PlayerID to link to their Apple ID.
     
    unity_Ctri and aixa1 like this.
  4. aixa1

    aixa1

    Joined:
    Aug 4, 2021
    Posts:
    2
    Not necessarily. In the end, I just want to have the possibility to sign in on both iPhone or IPad with selected PlayerID to fetch correct data from Cloud Save.
    There are two ways to handle it.
    1. The SignIn will return error CredentialsAlreadyInUse and also credentials already associated with that PlayerID. With that information you user can select right PlayerID. If user selects the account associated with other device (iPhone) We can just reload reload the game and sign in again with selected PlayerID. If user decides to use iPad account and still link with Apple ID then they would need to manually unlink Apple ID from iPhone device.
    2. That's the use case you mentioned - we transfer PlayerID to other Apple ID
    Hope that made it more clear :)
     
    Holmes555 likes this.
  5. avnishb_unity

    avnishb_unity

    Unity Technologies

    Joined:
    Oct 6, 2021
    Posts:
    9
    Thank you - this is super clear! We don't have a way to support this at the moment, but this is something we do plan to support before GA. We have it tentatively slated for Q1, but I will plan to follow up on this post in the next month or so to confirm the plan.
     
  6. avnishb_unity

    avnishb_unity

    Unity Technologies

    Joined:
    Oct 6, 2021
    Posts:
    9
    Hi Aixa- wanted to follow up here. Our latest version, Authentication 1.0.0-pre.37 now supports Account Unlinking along with the following features:
    • Session Token Management
    • Profiles support
    • User Info
    • Account Deletion
    We will be publishing our updated documentation this week which will provide more info on these capabilities. Thank you again for providing feedback! As for the second use case, that is something we are still planning to address in Q1.
     
  7. Holmes555

    Holmes555

    Joined:
    Sep 22, 2016
    Posts:
    14
    Hi, @avnishb_unity, I'm also interested in that topic, do you have any updates?
     
  8. Holmes555

    Holmes555

    Joined:
    Sep 22, 2016
    Posts:
    14
    Hey, @avnishb_unity you said about Q1, but it's already Q3, maybe you have any news on this?