question

bbekec avatar image
bbekec asked

Changing Login Type from LoginWithFacebook to LoginWithEMail

Hello, In my card game, I was using LoginWithFacebookAccount and now for some reasons I have to change login type to Email. I m successful with it but the problem is, with FB login email adresses are saved to contact Email. For thousands of previous users i need to use their contact email address as their login email adress. Therefore, they will able to continue to use their accounts. How can i do this?

Thanks

Account Managementsupport
10 |1200

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

Seth Du avatar image
Seth Du answered

In the normal circumstances, players will need to add email account via AddUsernamePassword API, which is client API. I believe you may inform the players that the main login method is switching to email login and setting flag in Player Read-Only Data for each player that marking whether this player has switched to email login. If the flag is checked as false when the player logs in, you may pop up a dialog to ask players to input password to complete the process (email address is read from contact address). Then after a certain update of the client, you may modify the client code and the main login method will be changed to email address and password.

3 comments
10 |1200

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

bbekec avatar image bbekec commented ·

Hello, thanks for reply. Do i have a chance to copy contact email to login mail for all players in cloudscripting? If yes, can you share an example code to do that. I m lack of knowledge about cloud script.

"(email address is read from contact address)" this is not possible i think. Because with IOS 13 Apple is not accepting apps using 3rd party login method (in my game i was using Facebook). For this reason i will remove Facebook login too from app. Therefore, for players there will be no login method to current profile.

In this situation, I need to check if entered email address is same with contact email adress or as i asked at first, I need to copy contact mail to login mail.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ bbekec commented ·

Cloud Script won't be able to handle this because either Client API or Admin API is not supported in Cloud Script. Azure function should work but still, to link an email address as login identity can only be done via AddUsernamePassword API, which also requires password. You may also need players to input it.

0 Likes 0 ·
Seth Du avatar image Seth Du ♦ bbekec commented ·

For now, I will suggest you to add LinkIOSDeviceID API in the client and use LoginWithIOSDeviceID for the alternative solution. Prompt players to link recoverable identity so that they can add email with password via AddUsernamePassword.

0 Likes 0 ·
bbekec avatar image
bbekec answered

Thank you so much. I will follow your instructions.

10 |1200

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

bbekec avatar image
bbekec answered

Hello, I have a problem again. In my previous messages I said that I am using Facebook login (Fortunately, I was also getting players device id's and linking that to their profile too). Now I decided to remove FB login from app and for player's first login at new login type, I thought using device ID to login, then (After login with device ID to the current profile) i will present a form to user to fill username, email, and password. I made neccessary changes in the app and when i was testing i came across with some new problem.

When I submit 3 parameters (Email, Password, Username) Playfab sends callBack "AccountAlreadyLinked". I couldnt understand why this happens. Thanks.

Edit: I found the problem. I used emulators for test, all opened emulators has the same device id and causes the problem.

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.