question

Henry Lisowski avatar image
Henry Lisowski asked

Refreshing Google Login vs Continuing DeviceId Login

Alright, so I have a flow question regarding Google Auth on Android.

Scenario:
I have google auth working properly, I get the token, I can call "loginWithGoogle" to playfab etc.

Question:
How do I handle authenticating the user in future app sessions? From what I can gather there's two ways to do this but I'm failing to fully understand the implications of either.

Suggested flow is to do a frictionless deviceid login, allow user to Link with GoogleLogin. Once account is linked continue to login with just the deviceid for as friction-free of an approach as possible.

Possible problem: Even though this seems to be the suggested approach in documentation, i remember reading somewhere that without an up-to-date google auth token there are some features playfab is unable to perform with respect to google accounts (though I'm not sure what these are). This would imply that after I allow the user to link their google account, I should always log the user in using the google flow, but this is hitting some other problems i'm having in trying to determine if SilentLogin failed due to token needing a refresh vs the user never having logged in to begin with.

So I guess the ultimate question is: After linking the users account with google, is there any downside to continuing to use the deviceid as the primary authentication method?

Authenticationandroid
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

As long as you link a recoverable login mechanism to a user’s account, in your case is the google account, it’s ok to continue to use the deviceid as the primary authentication method. However, please note that you should provide the option for the user to unlink & link deviceid if he/she wants to change the device.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.