I am making an app, and in that app, users login and I am storing their information; however, I have noticed that I don't have a users' password information after they register. Is it a good idea to store users' password when they register through Firebase? And is there a point where I will need their passwords? I want to make sure before I proceed further. Thanks!
2 Answers
You do not do that.
Use the (awesome, amazing) Firebase authentication system.
Click right here:
on the left, to see all the users - click "Authentication".
You never see / you cannot see their passwords.
You don't handle or touch the passwords at all.
In the Android or iOS app, you get the userid - and that's it.
The answer by @PeterHaddad shows perfectly how to do that.
That's the first and most basic step in any Firebase ios/droid app.
In your data you'll have a "table" called probably "userData/" and that's where you keep all data about the user. (For example, you may store their address, real name, shoe size .. whatever is relevant in your app.)
Note - FBase is so amazing, your users can also connect with other methods (phone, etc). For your reference in the future, that is explained here

- 27,874
- 70
- 431
- 719
-
2Firebase doesn't show users' password in the console. So I guess you are saying "Dont save passwords"? – Yunus Kulyyev Mar 18 '18 at 00:29
-
2That's totally correct, @YunusKulyyev. (1) you the developer can NOT see the passwords. (2) there is no WAY to see the passwords. (3) you never NEED to see the passwords. I hope, it makes sense! – Fattie Mar 18 '18 at 00:30
-
1Sure. I added some more detail, and you might want to read the link at the end - and the other answer is good too! :) Enjoy @YunusKulyyev – Fattie Mar 18 '18 at 00:32
-
1@Fattie hey, i have a case for the user to change his password so how can i handle it if I don't save his password? – Oliver D Nov 25 '19 at 12:25
-
1hi @OliverD - good news, they have a system for that and it is trivial. indeed there are many questions on here "firebase, change password?" - or, ask a new question on SO! there's a couple different ways to do it https://stackoverflow.com/a/42174864/294884 – Fattie Nov 25 '19 at 13:21
-
what about the case of no network? Wouldn't be better to save email + password in DB through Room so user can still access app feature on offline mode? – Red M Feb 04 '23 at 23:41
-
if you're offline, you cannot login – Fattie Feb 05 '23 at 04:13
You don't need to store the password in the firebase database, after you authenticate the user using createUserWithEmailAndPassword
the email and other info will be stored in the authentication console. So you do not need the password in the database, all you need is the userid to connect auth with database.
FirebaseUser user=FirebaseAuth.getInstance().getCurrentUser();
String useruid=user.getUid();

- 78,874
- 25
- 140
- 134
-
1hey, i have a case for the user to change his password so how can i handle it if I don't save his password? – Oliver D Nov 25 '19 at 12:26
-
1check this https://stackoverflow.com/questions/39866086/change-password-with-firebase-for-android – Peter Haddad Nov 25 '19 at 12:28
-
@PeterHaddad hi peter, i have a quick question. i have react native app for users and a react web app for the admin, i am using firebase authentication to log the admin into the admin panel. i am also storing their uid in a admin collection. i kept reading some answers and they same firebase authentication allows any user authenticated to login, does this mean the user using their credentials can log into my admin panel? – kd12345 Mar 01 '23 at 07:24