Okay, loaded a server, loaded nakama examples.
Built a username/email/password registration and login system.
Logged in. created socket. created chat.
Sent chat message, all clients hear message and process it.
They both see the same username of “tFzzLDqrAS”, and that’s not what is assigned to each of them.
Any idea what I’m doing wrong?
Okay, digging deeper, found this:
When I create an account using email, it’s also making a separate account using device id. I’m not telling it to do this, so it must be a feature…
Problem is, the login may know what account I want to use, but the chat seems to be using the device ID/name/data…
So, I need it to stop ‘helping’ me into a grave, and get rd of the second account?
Ideas?
1 Like
Hi @FoolishFrost welcome
They both see the same username of “tFzzLDqrAS”, and that’s not what is assigned to each of them.
You can assign a username when the player is authenticated for the first time with:
var session = await client.AuthenticateEmailAsync("some@email.com", "somepass", "someusername", true);
If the username input is null
or empty a username will be generated by the server. Usernames are cached in the session token for fast access on the server when requests are sent.
When I create an account using email, it’s also making a separate account using device id. I’m not telling it to do this, so it must be a feature…
This does not exist in the client SDK. There’s no “feature” which will create two session tokens for you with different authentication mechanisms. I think you’ll need to share your code for me to be able to help further.
1 Like