Sign In Register

How can we help you today?

Start a new topic
Answered

Player registration and social authentication

I am trying to figure out the best way to accomplish allowing a user to signup and then later attach a social login. What I envision as the requirements and possible process is as follows:

  1. User opens app and is presented with a login screen asking for a Callsign. This has to be unique and will be visible to other players. I considered using userName or displayName.
  2. User will have the option in this first screen to login with a social account (Facebook, Amazon, Google, etc), but does not have to do it at that point, so I would assume probably use DeviceRegistration in that case.
  3. User will still be able to connect their account to a social account later. This is where I am not sure how to go about it. If they did not initially use a social account, what is the best way to allow for this? This is a pretty common scenario in mobile games when they encourage you later to attach to Facebook or whatever.
  4. Ideally, User would be able to use multiple social accounts tied to the same account. For instance, in a game I have played for awhile (Star Wars Commander), it initially allowed you to choose a username, then asked to attach to Facebook. Later on, when they integrated Google Play services, it also logged in via Google. This meant the same account was tied in to Facebook and Google Play and allowed you to use either Facebook Gameroom or an Android device.


Best Answer

Hi Seth,


The displayName doesn't need to be unique where as the userName does need to be. The ideal flow here would be to use a DeviceAuthentication followed by a social connect request later should the user decide that they want to do that. You should think of the DeviceAuthentication account as a temporary account. It shouldn't be relied upon as the main means of authentication because if the user changes device a new account will be created when they log in. So its a good idea to have them authenticate socially or add a userName/password to a DeviceAuthenticated account to tie it to that user permanently. Having a social account linked or a password set on the account will mean that the user always has a route back to the account.


Users can authenticate with multiple social accounts. They just need to be authenticated at the time of the social authentication to make sure it links to the current account. Once a player is authenticated they simply need to send a social authentication request with "doNotLinkToCurrentPlayer" set to false. Then when they authenticate socially they would need to have switchIfPossible set to true to log into the account that was associated with externalId originally. If you have any further questions just let me know.


Regards,

Liam


Answer

Hi Seth,


The displayName doesn't need to be unique where as the userName does need to be. The ideal flow here would be to use a DeviceAuthentication followed by a social connect request later should the user decide that they want to do that. You should think of the DeviceAuthentication account as a temporary account. It shouldn't be relied upon as the main means of authentication because if the user changes device a new account will be created when they log in. So its a good idea to have them authenticate socially or add a userName/password to a DeviceAuthenticated account to tie it to that user permanently. Having a social account linked or a password set on the account will mean that the user always has a route back to the account.


Users can authenticate with multiple social accounts. They just need to be authenticated at the time of the social authentication to make sure it links to the current account. Once a player is authenticated they simply need to send a social authentication request with "doNotLinkToCurrentPlayer" set to false. Then when they authenticate socially they would need to have switchIfPossible set to true to log into the account that was associated with externalId originally. If you have any further questions just let me know.


Regards,

Liam

Thanks, Liam, I believe this makes sense now. Another question on this - if it starts with a DeviceAuthentication and then I let the user choose to add a userName/password to a DeviceAuthenticated account, will they then be able to tie in social account as well? For instance, they would end up with potentially a username/password authentication as well as 1 or more social accounts all tied to the same playerID?

Hi Seth,


Yes this would work fine. A social account can be linked at any time. The player just needs to be authenticated to link it to the currently authenticated account.


Regards,

Liam

Login to post a comment