Authentication now support Username/Password!

Hello everyone,

We are excited to announce that Username and Password support is now live with Authentication 2.7.2!

Demo
You can see it in action here:

Documentation
You can refer to our documentation (API and SDK) on how to set up and configure Username and Password.

8 Likes

Hi,
this demo looks very helpful to get more insights on best practices with the Authentication Package. Is it publicly available?

Also, what happens if a user forgets his/her password? Is there any functionality to reset it? Are you planning on adding an email address recovery functionality or something similar?

Updated to 2.7.2, but username & password method is not available yet. Any solution on this?

edit: nevermind, the current docs seems wrong. the method is SignUpWithUsernamePasswordAsync, the docs wrote it as SignUpWithUsernamePassword without the 'Async' part.

9204933--1284033--definition not exist.png

1 Like

Hi, Is there any solution when our player forget their password? I see that we can change password, but I don’t see any option when player forget their password.

Hello. What about gaming consoles like Xbox, will this auth method ever be supported on them? Do you have any plans about it?

Thank you so much for the feedback, I will follow up on the possibility to make it publicly available.
Regarding password recover concern, it's not currently on our roadmap and it's up to the developer to assist in password reset for this scenario.

Authentication supports consoles. To get started, please open a support ticket [here](http://Authentication has support for consoles, to get started please open a support ticket here).

Hey there I am trying this in the editor and when I try to sign up with SignUpWithUsernamePasswordAsync(username, password) I get the following error

[Authentication]: Request failed: 400, {"title":"INVALID_USERNAME","detail":"Username does not match requirements. Insert only letters, digits and symbols among {., -, _, @}. With a minimum of 3 characters and a maximum of 20","details":[ ],"status":400}, request-id: ec7a7451-0eff-4703-940f-613ca9b963c9

Now as far as I can tell my username is in fact correct since I also print my credentials on the console and have tried various combinations of usernames and passwords (all following the rules) and they all end up with the same result.

1 Like

Do you mind sharing a username that results in this error?

Regarding this, how would the developer assist in resetting the password? Is there a tool in the Unity Dashboard?

2 Likes

I have created a tutorial on this and I found that I needed to be on Authentication 3.0 to get it to work correctly. Is there a way to keep the user signed in?

Hi,

We are thinking of switching to unity authentication (so far we have been using firebase), but we found two big limitations:

  • Given a logged-in player, how can we know which providers he has linked? playerInfo.identities is always empty
  • If a user has created an account using username/password, is there a way he can recover the password in case he forgot it?

I don’t use the Identities property but all the methods for getting the entries, like GetAppleID(), GetUnityID() etc. If I use GetUnityID() on a player that has a linked UPA account, then it is not empty. But for checking if a username/password is added I don’t think there is a way for that.

Well, that’s a terrible workaround but it might work :smile:

But what about “forgot password” feature, IMHO that’s a pretty basic and fundamental feature.

Also I miss other features such as confirmation emails, but I guess we can live without it

Confirmation emails are sent when using UPA, but not for username/password, because a username is not necessarily an email. Email/password login is still an element on the authentication roadmap in the “Under Consideration” section: https://unity.com/roadmap/unity-gaming-services/game-backend

1 Like

According to scripting docs we have to use this method for signing up.
SignUpWithUsernamePasswordAsync(String, String)
In these docs it says something different. I believe the Sign In method is incorrect as well.

Hi UNITY Team!

Let me say first that anonymous authentication and authentication with a "game-specific" username and password are great ideas and we would love to implement this!

But we did some testing (Editor 2022.3.10 and authentication package 3.0.0) and are confused:

We are able to add a username/password to an anonymous/cached player. It also works fine to delete this "account" again.

But what we cant do is sign in with this username / password as the method SignInWithUsernamePasswordAsync(String, String) is not accessible.

That makes sense in so far as this method is not listed in the scripting API: https://docs.unity3d.com/Packages/com.unity.services.authentication@3.0/api/Unity.Services.Authentication.IAuthenticationService.html; However the method is described here in the manual: https://docs.unity.com/ugs/en-us/manual/authentication/manual/platform-signin-username-password).

Now we ask ourselves: What's the point, if you can add a username / password account to a user, when you cannot come back and sign in to it? We thought th objective would be that a user can sign in on a different device that has not the same session token and can restore the cloud-saved game progress there by doing so.

Could you please explain what we are missing?

Thanks - Max

The option to sign in with username and password exists and is listed in the referenced API docs just before the SignOut method.

Now, i ask again, whats the recommended procedure if a player forgets his password and/or username?

3 Likes

Well, ok it was kind of a typo. I just copied from the manual which reads “SignInWithUsernamePassword” instead of “SignInWithUsernamePasswordAsync”

9385268--1312883--upload_2023-10-3_10-54-7.png

In case you want to correct that…