-1

I'm making an app using Flutter and firebase which allows the user to create an account and log in and out. Can Firebase handle 2 different users with the same username? Do I need to add something to prevent this from happening? Will Firebase know which user is trying to log in, by looking at the different passwords? (my App doesn't take the email address of the users, just their username)

eg.:

username(email): Jack ; password: awesome

username(email): Jack ; password: summer

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
JakesMD
  • 1,646
  • 2
  • 15
  • 35
  • If you use Firebase own authentication system, there is an option to allow/prohibit multiple accounts from the same users. [More info here](https://stackoverflow.com/questions/41916776/firebase-allowing-multiple-accounts-from-same-email-address) – Lucas Sousa Mar 30 '20 at 17:54

1 Answers1

1

With Firebase Authentication, two user accounts can't have the same email address. Your code should check the result of the API you're using the create the account - it will tell you if the account already exists with that email.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441