Search Unity

Feedback Cross-Platform login documentation

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

  1. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hi,

    the Authentication documentation has a use-case stating "Keep up with a player across multiple devices" and in there, "[...] set up sign-ins with platform accounts so the same player can sign in [...]".

    Neither Google Play Games nor Apple Sign-In allows for signing in via user name + password, as they both use their own platform credentials or username.

    How does setting up platform accounts actually help with connecting a player to the same account on different platforms, if there is a completely different sign in per platform? There is no documentation on that matter.

    Thanks your for any insights.
     
  2. unity_Ctri

    unity_Ctri

    Unity Technologies

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

    Excellent questions, I've passed your feedback back to our developers to get full clarity on the matter, and see if we can improve documentation.

    You can have multiple authenticaiton providers tied to the same account. That means it's possible to use Google, Apple, and so on, on other platforms.
    I don't have any screenshots to share (but I am trying to get my hands on some for you), but I'll see if we can improve the documentation with how successful implementations might look in practice, in particular with cross-platform account sync.
     
    hkalterkait, SebT_Unity and Baroni like this.
  3. unity_Ctri

    unity_Ctri

    Unity Technologies

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

    Here's our general Best Practice guidelines about implementing authentication, which outlines the best ways to implement it.
    To address your non-native sign on concerns: this is absolutely possible.

    > The authentication flow should work regardless of the native platform as long as there is a native implementation available to fetch the relevant sign in token. So if you are on an Android device you should be able to login via steam/fb/apple as long as the the user is able to implement fetching the steam/apple token on the android device.

    So as I understand it, there would be a piece of work needed to get the user to a Steam / Apple login flow, and our SDK can handle the response from that. I'm verifying that understanding is correct and will post & edit here if I'm mistaken.

    Hope this helps!

    Edit: My understanding is correct :)
    To avoid 3rd party dependencies in our packages, the SDK does not have a built in mechanisms to get the Apple/ Steam/ FB/ Google tokens needed for account linking / sign-on.
     
    Last edited: Oct 26, 2021
    hkalterkait likes this.
  4. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hi Ctri,

    thank you for your reply, however I do not know what to get out of it :D

    So the baseline is that it is possible, and the user can get a Steam/Apple/whatever token on whatever platform, but the SDK does not show a sample because of 3rd party dependencies?

    Maybe that's something to show more in-depth in a sample script on the documentation pages then :cool:
     
    samudralasagar likes this.
  5. randyl_unity

    randyl_unity

    Unity Technologies

    Joined:
    Aug 22, 2019
    Posts:
    7
    Hi Baroni,

    Providing a combination of account linking options for your user base is useful for you because it gives you the capability to provide users with the ability to use the same account across different devices.

    Here is an example of multi-platform, cross-device authentication:

    1. User is on apple device. user logs into game via apple account.
    2. User is on android device. user logs into game via google account.
    3. You (game dev) provide a notice that if user wants to use the a single account accross device, the user has the option to link to platform agnostic accounts.
    4. User links both accounts to facebook account, now its all single user account.

    Here is another example of multi-platform, cross-device authentication:

    1. User logs in via facebook account on one device.
    2. User logs in via facebook account on another device.

    It is true that there are 3rd party logins which only work with certain platforms (i.e Sign In with Apple). There are also 3rd party logins (i.e Sign In with Facebook), which work on multiple platforms.

    Hope this answers your question
    Feel free to reach out again if you have more questions!
     
  6. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hi @randyl_unity,

    thank you for your reply, that makes sense! So in order to have cross platform authentication, you have use a login method that works all platforms, like Facebook. That's what I've assumed.

    As a final post in this thread I would then like to give my vote on another feature described in this other thread:
    https://forum.unity.com/threads/link-anonymous-account-with-other-credentials.1187122/

    To support the following workflow:
    1. User logs in with Android on device A
    2. Same user logs in with Apple on device B
    3. User on device B would like to link with Player ID created on device A. This could work with sending a request to the Player ID and Cloud Save of device A. Device A can approve and assigns device B to its Player ID as well.

    The result would be that a third login like Facebook would not be needed.
     
  7. avnishb_unity

    avnishb_unity

    Unity Technologies

    Joined:
    Oct 6, 2021
    Posts:
    9
    Hi Baroni - thanks for the suggestion!
    The feedback some developers have shared is that they need a white-label email/user name login solution for this use case, and so their players aren't using a 3rd party login.

    Is this the case for you as well, or do you prefer to support 3rd party logins?

    We have an Authentication beta user survey, and I'd love your feedback in how we can improve the product.
     
    SebT_Unity likes this.
  8. Baroni

    Baroni

    Joined:
    Aug 20, 2010
    Posts:
    3,267
    Hi avnishb, I guess an email/user name + password login would be a workaround for native cross platform logins, but I would still like to use them.

    Ultimately for native logins, if you would offer an API that lets ID-A link to ID-B, users could do everything they want with it even on yet unsupported platforms. I know that there might be a security concern just letting clients link their own ID to a different one they potentially do not rightfully own, but that's what Cloud Code/Save is for and we could handle it in there.
     
    Holmes555 likes this.
  9. Bunzaga

    Bunzaga

    Joined:
    Jan 9, 2009
    Posts:
    202
    A good example of this is when you're setting up a smart TV with Disney+ or Hulu, etc. You go to the new device, it has an ephemeral code to enter from your existing device. It would be VERY useful if this was a built in feature, instead of making every developer come up with their own solution.
     
  10. stephen_mor

    stephen_mor

    Joined:
    Apr 3, 2019
    Posts:
    7
    This is one of the things that is confusing me about the current system. It seems fairly straightforward to link a user account with say, Steam, getting the authentication token from the steam backend which creates PlayerID A. But if we then if the user boots up the game on a different platform (e.g. Android) how do we say "This account should be linked to PlayerID A" rather than create a new PlayerID B based on the current session?

    The linking methods only provide the current platform token as an input, not a PlayerID or account info, so I'm little confused how that works?
     
  11. stephen_mor

    stephen_mor

    Joined:
    Apr 3, 2019
    Posts:
    7
    OK, yeah, this is kind of bugging me. The documentation says:

    Note: While you can implement more than one platform sign-in in your game from different platforms, you can only have one sign-in per platform. For example, if you have a Facebook account and a Google Play Games account, you're able to link the same Player ID with both accounts. However, if you have two different Facebook accounts, you can only link your Player ID with one of these Facebook accounts.

    So if a user has our game on two platforms, say Steam on Windows and on Android on their phone, how do I link their two accounts? Both are logged in via their respective platforms, but if I link their account with a player ID, it doesn't seem to have any options with connecting to an existing account. Do I need to add a Steam login on the android release? I can't just say "Connect the current token to PlayerID X"?
     
  12. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,081
    Is this white label email/user name login solution still planned? I think that its the best approach for cross platform sign in, with facebook less and less used by the younger generation and OpenId Connect complex to implement (needs a "custom id provider", still have to understand who they are)
     
  13. chengg_unity

    chengg_unity

    Unity Technologies

    Joined:
    May 15, 2022
    Posts:
    69
    Hello @newlife ,
    The white-label username & password support is planned for Q2/Q3. You can find our public roadmap here.
     
    P_e_t_a_c_h_e_k likes this.
  14. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,081
    Well the white label username and password support is both in "planned" and in "under consideration" sections.. Which is the correct one?
     
  15. chengg_unity

    chengg_unity

    Unity Technologies

    Joined:
    May 15, 2022
    Posts:
    69
    We are separating username & password and email & password support into two different features.
    The username & password is in the "planned" section, but the email & password is in "under consideration".
     
  16. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,081
    Ah ok. IMO, username and password is the way to go, no concern about privacy issues with email
     
    MousePods and chengg_unity like this.