question

Kakashi avatar image
Kakashi asked

Login Players with a code instead of email and password,Logging in player with a X-digit code

Hi !
I am new to PlayFab.
I want to create my user logs in on the web page of the game using LoginWithEmailAdress and generate a code which can be used to sign in a different device. For example let's say I have a VR app and typing email and password in VR could be annoying instead I log in the web browser of my pc or mobile , generate a code that expires in , let's say, 5 minutes and just put that code in VR instead of email and password.

My question is :
Is there a method where I can store these codes against PlayerId or customid and when user types that code in, I run a CloudScript to log the player against that code in ?
I tried Internal Title Data , Title Data but almost everything requires either a X-Authorization plus title data is meant to be data that doesn't change that much because it could 15 minutes for changes to apply.

,

Hi !
I am new to PlayFab.
I want to create my user logs in on the web page of the game using LoginWithEmailAdress and generate a code which can be used to sign in a different device. For example let's say I have a VR app and typing email and password in VR could be annoying instead I log in the web browser of my pc or mobile , generate a code and just put that code in VR instead of email and password.

My question is :
Is there a method where I can store these codes against PlayerId or customid and when user types that code in, I run a CloudScript to log the player against that code in ?
I tried Internal Title Data , Title Data but almost everything requires either a X-Authorization plus title data is meant to be data that doesn't change that much because it could 15 minutes for changes to apply.

Player Datadata
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

·
Rick Chen avatar image
Rick Chen answered

The X-Authorization is the session ticket from the login result. It is true that a user should be logged in to call the CloudScript.

A workaround for your scenario I can think of is that you can store the code in the CustomId, in other words, use the LinkCustomID to link the user’s email account with the unique login code. Then the user can use this code login to his email account on Client. And after the user quit the VR APP, they should use the UnlinkCustomID to remove the login code from the user’s email account. However, here are some down sides for this workaround:

  • You must ensure the code are unique for the different users. Otherwise the LinkCustomID API may not be successful.
  • The login code as CustomId will attach to the user’s PlayFab account forever until it is unlinked. There is no way to set the expiration time for that.
  • Since there is no expiration time for the CustomId, it should not be too simple for other people to guess.
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.