如何在Firebase中手动查看经过身份验证的用户的显示名称? [英] How do I manually view an authenticated user's display name in Firebase?

查看:54
本文介绍了如何在Firebase中手动查看经过身份验证的用户的显示名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道您可以使用Firebase设置/获取经过身份验证的用户的显示名称,但是该名称存储在哪里?我可以登录Firebase控制台查看显示名称吗?

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?

谢谢!

基本上,我需要能够执行所有所有操作的原因是为了防止2个用户使用相同的显示名称(用户名).

Basically, the reason I need to be able to do all this is to prevent 2 users from having the same display name (username).

推荐答案

Firebase用户的显示名称存储在哪里?

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.

我可以登录Firebase控制台查看显示名称吗?

Can I login to the Firebase console to see the display name ?

您可以登录Firebase控制台,但看不到显示名称.

You can log in into the Firebase console but you won't see the display name.

防止2个用户使用相同的显示名称(用户名).

Prevent 2 users from having the same display name (username).

为此,一种解决方案是将所有用户名存储在Firebase实时数据库中的某个位置. (就像用户名的特定节点一样).然后,在代码中,您可以检查它是否已经存在,或者使用数据库安全规则来使已使用的用户名无效. 但是只有使用Firebase身份验证中的显示名称信息,您才能防止重复.

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.

这篇关于如何在Firebase中手动查看经过身份验证的用户的显示名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆