How to use username authentication (registration) instead of email?

Hello There,
Is it possible to create an user account via Username and password only instead of email and password?
We tried to do it using email authentication by sending username and password parameter but its not allowing.

Thanks

@YoursTruly you can create a before or after hook for AuthenticateCustom in the server framework and then call the client AuthenticateCustom method and pass password through the vars parameter.

@YoursTruly We validate emails so the sign-in is always done against the email address as input. I can see a use case to allow sign-in via username and password though. Can you open a feature request for it?

@novabyte Feature request created on Github.

@lugehorsam Can you please provide a bit more information how to do it via AuthenticateCustom in the server framework? Issue is with registration/sign up , for Sign In it works fine with username and password

Thanks

@YoursTruly The suggestion that @lugehorsam made is if you want to handle your own email-based authentication service which can do username based sign-in. That way you can bind those user accounts to Nakama through custom authentication but control the accounts system yourself.

I saw the feature request you opened and we’ll see how best to add it to the next set of engineering tasks.

1 Like

Thank you @novabyte noted on it.

As a workaround you could just make it an email address by appending @example.com or @.com to the username.
Might still impose some restriction on the username though

1 Like