How do I manually view an authenticated user's display name in Firebase?

筅森魡賤 提交于 2019-12-20 02:37:09

问题


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).


回答1:


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.



来源:https://stackoverflow.com/questions/47402487/how-do-i-manually-view-an-authenticated-users-display-name-in-firebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!