Best way to easily register/signiIn players

Hi there,

here’s my question:
i’m developing my first game and it implements unity-leaderboard feature to save, load and show player’s score.

i need a register/login functionality because i want player’s score to be persisted and retrievable.

i want to avoid SignInAnonymouslyAsync, because i want players to be able to login and retrieve scores across different platforms or when uninstalling and reinstalling the game.

i’m completely new to this world and i’m afraid of compliance issues, providers costs and all this stuff, that’s why i think the unity “username/password authentication” may be the best solution.

i don’t need any advanced feature and prefer an easy and fast solution.

the only thing i’m worried about is the password-recovery functionality: would it be possible to implement it whne using unity “username/password authentication” ? and how ?

what would you suggest ? any advice from your experiences would be highly appreciated.

thanks

Then you haven’t fully understood the use of the anonymous sign in. It serves two purposes:

  1. local-only storage of player progression with an upgrade path
  2. automatically sign in with previous sign in method

Both cases reduce friction and make for best UX.

For #1 you can provide an “upgrade” feature in your game for the player to move from anonymous to platform sign-in exactly in order to allow the player to move between devices and to “secure” the account eg anonymous progress is lost when the app is deleted. The manual details this in a showcase.

The username/password option has no password recovery! That’s the big downside of this, which to me means it’s practically useless. A user would have to make a support request to you, and you’d have to trust the user that he is who he tells you that he is and manually reset their password.

You have no way of verifying that the user is who he tells you that he is - username/password doesn’t store an email. At best, you could ask for the user’s email, implement a verification system, and store the email along with the player ID separately somewhere - but that seems like a lot of extra effort and is not advisable if you’ve never done this before.

It’s best to implement the well established sign-in options (google, apple, steam, etc) that best fit the platform.

Alternative: inform the user to remember username/password as these are non-recoverable by the user or support.

1 Like

Thanks so much for your reply,

here’s another question:

i implemented a firebase registration and login system.

let’s say that 2 gamers use the same pc to play the game for the first time.

the first one signs on( again: the game uses firebase to register and login ), he logs in, he plays and, with anonymous login, he receives a playerId that unity uses to save the score. finally he logs out.

then comes the second one who does exactly the same.

unity would give them the same playerId ( if i understood the process correctly ) so the second one would overwrite the first one’s scores ( given that the second one scores better ).

is there a way to avoid this ?

Either both users use a separate (not anonymous) account, or you’d have to program something like user profiles into the app so that users can use the same (anonymous or not) account but the data is stored separately for each “profile”. It’s like choosing a different save slot.

1 Like