0

In firebase, I can create an account with email, phone number, etc. But, it was impossible to create an account only with ID and password. Is there any way to do it?

What I've tried to do it:

  1. Allow users to create an account with email -> ask ID of the user -> save the ID in firestore

disadvantage of this way: Hard (or maybe impossible) to set the rules of Firestore. So, I think that some hackers can read or change the data.

  1. Not using firebase auth: just save the ID and hashed password in database

disadvantage: In my case, I wasn't able to set rule of the database, so I am concerned about hackers changing data such as ID and password

Shawn
  • 83
  • 1
  • 7

2 Answers2

0

There is no offically supported ways to create an account using just an username and a password. My suggestion is stick to using email and password, get an ID and save to Firestore if you want to, then ask questions on Stackoverflow about Firestore rules. It is way easier and more secure than implementing your own authentication system

ThienLD
  • 741
  • 4
  • 14
0

There is no built-in provider for ID/username and password, but there's an example in the functions-samples repo of it.

Also see:

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807