本文介绍了是火力用户ID唯一每提供商(Facebook,微博,密码)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果允许多个火力点AUTH提供商(推特,脸谱,密码),它是最好的存储用户以这种方式:

If allowing multiple auth providers in firebase (twitter, facebook, password), is it best to store users in this manner:

/用户/ [auth.id] _ [auth.provider] / ...

/users/[auth.id]_[auth.provider]/...

它看起来像有可能是基于对供应商在auth.id重叠。

It looks like there could be overlap in auth.id based on the provider.

大多数例子有安全文件只检查auth.id.我试图避免创造我自己的用户ID的复杂性。

Most of the examples have the security file only checking auth.id. I'm attempting to avoid the complexity of creating my own user ids.

思考?

推荐答案

火力地堡现在提供了一个 UID 参数auth对象,这是保证在供应商唯一的。例如,看到任何一个简单的登录供应商,如的

Firebase now provides a uid parameter on the auth object, which is guaranteed to be unique across providers. For example, see "After Authenticating" on any of the simple login providers, such as email/password

这篇关于是火力用户ID唯一每提供商(Facebook,微博,密码)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 03:38