I am registering a device with the DeviceAuthentication and then allowing the user to update their username.
The problem is the next time they open the app it creates a new player. Is there no way to change the username for a player that uses device authentication?
Best Answer
C
Customer Support
said
over 4 years ago
Hi,
When you perform a DeviceAuthenticationRequest the userName for that account gets stored in the following format, "gameID - DeviceOS - DeviceID". So if you change the username at this point you break the connection between the device and that account. What you should do after DeviceAuthentication is either authenticate socially with a players external account or add (in your case change) the userName and add a password to the account so the player can log back in no matter what device they are on. You can do this with a ChangeUserDetailsRequest. You should think of a DeviceAuthentication as a temporary log in before a player connects a social account or adds a password. I hope that helps.
When the player is opening the app after they have updated they're username what username are you using to sign them in? Could you provide a client side log of the steps you take to log the player in after they have updated they're username?
Kind regards
- Steve
T
TnT Games
said
over 4 years ago
I should also mention we are using Unity. We use device authentication request to log them in.
new GameSparks.Api.Requests.DeviceAuthenticationRequest().Send((response) => { ...
The username that is created with the initial device authentication is not user friendly so we allow them to updated it to something of their choosing. We also use the username for sending requests to other players to join a team. We can use display name but we want all display names to be unique, since username already has a unique check built in we just update the username and display name to be the same.
Below is what I see when they try to login a second time after changing their username. You can see it thinks it is a new player.
When you perform a DeviceAuthenticationRequest the userName for that account gets stored in the following format, "gameID - DeviceOS - DeviceID". So if you change the username at this point you break the connection between the device and that account. What you should do after DeviceAuthentication is either authenticate socially with a players external account or add (in your case change) the userName and add a password to the account so the player can log back in no matter what device they are on. You can do this with a ChangeUserDetailsRequest. You should think of a DeviceAuthentication as a temporary log in before a player connects a social account or adds a password. I hope that helps.
Thanks,
Liam
T
TnT Games
said
over 4 years ago
We are using the device authentication request as a temporary request. We allow the user to link their facebook or google account at a later time. What we don't want to do however is force a player to link an account if they don't want to so we allow them to play the game only using device authentication and if they like it and want to save their progress then they can link an account.
So what I am hearing is no, you cannot change the username with device authentication. We can however change the username with any other type of authentication. We will have to write our own code then to just use display names throughout the app and check for duplicate display names when creating a new player.
If we could add a feature request it would be to store the device authentication connection information in a different place than the username field so people can update the username to whatever they want.
TnT Games
I am registering a device with the DeviceAuthentication and then allowing the user to update their username.
The problem is the next time they open the app it creates a new player. Is there no way to change the username for a player that uses device authentication?
Hi,
When you perform a DeviceAuthenticationRequest the userName for that account gets stored in the following format, "gameID - DeviceOS - DeviceID". So if you change the username at this point you break the connection between the device and that account. What you should do after DeviceAuthentication is either authenticate socially with a players external account or add (in your case change) the userName and add a password to the account so the player can log back in no matter what device they are on. You can do this with a ChangeUserDetailsRequest. You should think of a DeviceAuthentication as a temporary log in before a player connects a social account or adds a password. I hope that helps.
Thanks,
Liam
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Hi TnT,
When the player is opening the app after they have updated they're username what username are you using to sign them in? Could you provide a client side log of the steps you take to log the player in after they have updated they're username?
Kind regards
- Steve
TnT Games
I should also mention we are using Unity. We use device authentication request to log them in.
The username that is created with the initial device authentication is not user friendly so we allow them to updated it to something of their choosing. We also use the username for sending requests to other players to join a team. We can use display name but we want all display names to be unique, since username already has a unique check built in we just update the username and display name to be the same.
Below is what I see when they try to login a second time after changing their username. You can see it thinks it is a new player.
Customer Support
Hi,
When you perform a DeviceAuthenticationRequest the userName for that account gets stored in the following format, "gameID - DeviceOS - DeviceID". So if you change the username at this point you break the connection between the device and that account. What you should do after DeviceAuthentication is either authenticate socially with a players external account or add (in your case change) the userName and add a password to the account so the player can log back in no matter what device they are on. You can do this with a ChangeUserDetailsRequest. You should think of a DeviceAuthentication as a temporary log in before a player connects a social account or adds a password. I hope that helps.
Thanks,
Liam
TnT Games
We are using the device authentication request as a temporary request. We allow the user to link their facebook or google account at a later time. What we don't want to do however is force a player to link an account if they don't want to so we allow them to play the game only using device authentication and if they like it and want to save their progress then they can link an account.
So what I am hearing is no, you cannot change the username with device authentication. We can however change the username with any other type of authentication. We will have to write our own code then to just use display names throughout the app and check for duplicate display names when creating a new player.
If we could add a feature request it would be to store the device authentication connection information in a different place than the username field so people can update the username to whatever they want.
2 people like this
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2486 topics