heroiclabs / nakama-unity

Unity client for Nakama server.
https://heroiclabs.com/docs/unity-client-guide
Other
417 stars 75 forks source link

When you authenticate with device id and you want create user with a custom username it does not get the username #125

Closed ahmtmcr closed 3 years ago

ahmtmcr commented 3 years ago

session = await client.AuthenticateEmailAsync(email.text, password.text, username.text, true); When i do it with the email it gets the custom username and sets it to session.Username.

session = await client.AuthenticateDeviceAsync(SystemInfo.deviceUniqueIdentifier, username.text, true); When i do it with the device id it gives random username to the session.Username.

lugehorsam commented 3 years ago

Hey @ahmtmcr I wrote the following test to verify that username persists across device authentication:

https://github.com/heroiclabs/nakama-dotnet/commit/3ab2e1dd0535e565f4a36407515bff0561fae4d3

Are you sure you're using a device id belonging to a non-existent account? It's possible you are simply getting an existing account with an existing username.

ahmtmcr commented 3 years ago

I opened nakama console and deleted all the accounts and it works thank you for the answer , i should have thought of that because its a device id sorry for the trouble.