I'm making a react native app using firebase, for logging in im using email and pass authentication. But, is there a way to login in using username and password?
Asked
Active
Viewed 169 times
0
Frank van Puffelen
- 565,676
- 79
- 828
- 807
Monty
- 197
- 2
- 10
-
1Also see https://github.com/firebase/functions-samples/tree/master/username-password-auth for a working example. – Frank van Puffelen May 09 '20 at 04:00
1 Answers
1
As far as I know, firebase does not provide username and password for login.
If you really need to use username+password (why though?), the solution is to setup it yourself using firebase function. You save the username and password yourself in firebase, and the function read and match the inputted data from firebase. If matched, you create custom firebase auth token
Beware though, don't expose sensitive data publicly, be sure to set the database to reject all read/write request from user (only allow it from your function)
aaron
- 257
- 6
- 15