question

Brendan Malcolm avatar image
Brendan Malcolm asked

Transitioning to PlayFab authentication - AddUsernamePassword requires an Email Address, but RegisterPlayFabUser does not.

Hey! I have a scenario that is posing quite inconvenient for me.

Currently I am in the process of transition all my Authentication to PlayFab for better security and scalability from what I currently have setup.

This process requires me to use AddUsernamePassword due to PlayFab accounts already existing for users using the CustomID functionality.

My current custom registration contains an optional email field. Unfortunately, AddUsernamePassword requires an Email Address to be set in order for it to complete.

This will pose a lot of difficulties during the transition as many Players chose to not have an email address attached. I would like to keep this true moving into the future with this transition.

I have noticed when transitioning my registration process to simply use RegisterPlayFabUser that the email field in this requests is optional. That is perfect for what I am after, however it shows some inconsistencies with how both APIs function.

I know the AddUsernamePassword is setup for account recovery purposes, but I would like to know if there is any way I can add a username and password to existing PlayFab account without providing an email address?

This will allow me to grandfather existing players over to the new authentication without affecting their existing accounts.

Hopefully there is a method I am missing - or if possible - make the Email field optional in all APIs.

Thanks in advance.

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

·
Sarah Zhang avatar image
Sarah Zhang answered

Currently, we don’t support calling this API AddUsernamePassword without providing an email address. If you need an API method that allows you to add the username and the password to players and doesn’t require an email address. You can try to add a feature request for it. To implement your requirements, the possible workaround is to generate the random fake emails for players to bypass the API verification. Before you implement such workarounds, please note that, the email address is the only way PlayFab provided to recovery the players’ accounts when they forget the passwords. If providing email addresses is an option, it may cause the account recovery feature to not work.

1 comment
10 |1200

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

Brendan Malcolm avatar image Brendan Malcolm commented ·

Thanks for the response! It's unfortunate that it is not possible to add a username and password without the email address.

I guess my only solution is to go with the temporary random email address for the transition, that way I don't need to force the email to be added during the conversion process which will simply delay the whole process for those who don't want to add an email.

I will of course be heavily communicating to players to add an email address for recovery.

0 Likes 0 ·

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.