2

Is it possible to implement Firebase Authentication with Username And Password (not email and Password) in Flutter? Is there a way to do it with the Firebase Auth Plugin?

4 Answers 4

2

Logically you can control email address I mean if you want you can maintain email address pattern and store the username for the created UID . Example : Var currentTimeStamp: [email protected]

No Need to verify the email address as you need only the UID Then you have to store the UID ,email address ,along with username in the Firestone or real-time database so that user can login again with the user name .you have to check user name and password is correct or not then do signin with that email addrsss and the given password

Thanks It’s just an idea

Sign up to request clarification or add additional context in comments.

Comments

1

No, FirebaseAuth only supports sign in with email and password. There are no usernames unfortunately.

Comments

1

Currently there is no way to use the default FirebaseAuth to sign in with a username. But email + password login is much more secure because if you want to try and brute force a user you have 2 missing pieces of information instead of one.

Comments

0

Actually there is a way from the start offered by Firebase. It is by using Custom Auth Tokens (link).

But this is most suitable when you have complete custom server/backend and only want to use Firebase Authentication to handle the authentication.

You will need to create custom auth tokens using the user's user id and password. This can only be done by Firebase Admin SDK (link).

That means this approach needs some kind of server. You can use Google cloud functions or AWS lambda for some cheap options.

Then in order to use the authenticated users, you'll need to implement a function to verify these tokens (link). This gives the UID of the user.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.