question

Alex Girgis avatar image
Alex Girgis asked

Linking accounts and retrieving email

Hi,

I just wanted to get a better understanding as I'm setting up my authentication flow as I'm hitting some walls.

I want users to be logged in silently and then later add a recoverable login.

Currently I have my game set up to login with ios device Id. And a user can link to facebook afterwards. But I'm having some trouble understanding how this makes it recoverable: If they open the game on device B and link their facebook it won't work because facebook is linked to device A. And if they unlink fb from device A and relink it on device B they'll be linking to a new account and won't be recovering anything.

My question is, what flow do I use to make the account recoverable?

And as a sneaky side question can I just confirm that there is no way to retrieve the users email from from either linking or logging into facebook?

Hope this makes sense. Thank you.

10 |1200

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

JayZuo avatar image
JayZuo answered

After linking with Facebook, the player account is already recoverable. I'd think what you need to change is the login flow.

In your client you should store some value locally to identify if this is the first time to use the client. If it is, then you should display a menu or UI to let the player choose if he wants to create a new account or login with Facebook.

Creating new account means login with device Id and "CreateAccount" option is set to "true". Afterwards, you can display a menu to let the player link with Facebook to make his account recoverable.

With this flow, in Device B, customer can just click login with Facebook to keep playing with his account without creating a new account. And then you can ask the player if he wants to link this new device into his account.

After linking Device B into the PlayFab account, you can store it locally, so that next time, player can directly log into your game without any UI or clicking.

10 |1200

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

Ivan Cai avatar image
Ivan Cai answered

When the playfab account(Device A) does not link facebook account, everything before will only be saved on the playfab account(Device A) and cannot be restored to the playfab account(Device B). Currently, playfab does not support retrieving the users email from either linking or logging into facebook. Meanwhile, I find two related threads(https://community.playfab.com/questions/16137/save-email-address-when-logging-in-with-facebook.html https://community.playfab.com/questions/16042/how-to-get-google-mail-of-accountinfo.html ) and hope them to help you.

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.