I know that you can set/retrieve an authenticated user's display name using Firebase but where is this being stored? Can I login to the Firebase console to see the display name?
Thank you!
Edit: Basically, the reason I need to be able to do all this is to prevent 2 users from having the same display name (username).
If the user login with a custom "email/password" you don't know anything else about that user (apart from the unique user id). If a user login with Facebook, or with Google sign in, you can get other information like the profile picture url. It is explained here: firebase.google.com/docs/auth/android/… .
var user = firebase. auth(). currentUser; if (user) { // User is signed in. } else { // No user is signed in. }
You should make these modifications in the Google API Console (https://console.cloud.google.com). Go there, find your project's credentials, click "OAuth consent screen" and then there is a textbox that says "Product name shown to users", change the current name to your app's name and click "Save".
Where is the Firebase user's display name being stored ?
Well it's a good question because it's hidden somewhere but it's not easily displayed.
Can I login to the Firebase console to see the display name ?
You can log in into the Firebase console but you won't see the display name.
Prevent 2 users from having the same display name (username).
For this, one solution is to store somewhere in your Firebase realtime database all the usernames. (Like a specific node for usernames). And then either in code, you can check if it already exists or use database security rules to invalidate an already taken username. But only with the display name info from Firebase authentification you can't prevent duplicates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With