question

Martin avatar image
Martin asked

Link Email and Password to anonymous Account

Hi,

I want to ask, is there a way to link email and password without providing username to an anonymous account? I only found AddUsernamePasswordRequest, which requires a username. There is RegisterPlayFabUserRequest, which does not requre username, but it creates new account which is not what I want.

If there is no way to do this, may I ask why? It seems it should be possible.

Authentication
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

·
Neils Shi avatar image
Neils Shi answered

Currently, if you want to add a recoverable login mechanism to an anonymous account, you can use AddUsernamePassword or link with third party (LinkWithFacebook/LinkWithGoogle). And the Username is required when you call API AddUsernamePassword. Can you tell me why you don't want to provide a username? If you just don't want to enter username when logging in, you can use LoginWithEmailAddress after completing AddUsernamePassword, it doesn't require a username.

4 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.

Martin avatar image Martin commented ·

Thanks for the answer, but what about the "Why" part? It seems like an arbitrary decission to force user to fill username in this registration method, but not in the other one. As to why I don't want for users to enter username: 1. I create anonymous account for new player. 2. Then after some time, I prompt him with Choose a Name dialog (which is a DisplayName because I want to allow multiple same display names) 3. Then after some time, I prompt him with Register dialog, and here my only option is AddUsernamePasswordRequest (I don't use 3rd party logins). But I don't want to force user to choose another name - it would be confusing for him. My game is small hypercasual game with almost no texts, I don't want to explain to him what is going on, I just want my registration flow as easy as possible. Otherwise the player won't register (it's optional).

Which brings me back to my question - why is username required? It seems unnecessary at least from the outside.

0 Likes 0 ·
Neils Shi avatar image Neils Shi Martin commented ·

After players use AddUsernamePassword to add a recoverable login mechanism, players can choose LoginWithEmailAddress (which requires Email and Password) or LoginWithPlayFab (which requires Username and Password) to login in. It depends on how you want the player to log in. Currently, this API does need username, email address, and password. Sorry for the inconvenience. You can make a feature request here in this forum to help us prioritize our work:https://community.playfab.com/spaces/24/index.html

0 Likes 0 ·
Martin avatar image Martin Neils Shi commented ·

I am talking only about registration process. Everything after registration is fine, as you wrote, LoginWithEmailAdress is what I use. But thanks anyway. I will make a feature request

0 Likes 0 ·
Show more comments

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.