在 Firebase 3 文档中,他们说您可以获取其他范围数据,例如:
Optional: Specify additional OAuth 2.0 scopes that you want to request from the authentication provider. To add a scope, call addScope. For example:
provider.addScope('https://www.googleapis.com/auth/plus.login');
一旦通过身份验证,我就无法找到作为“用户”对象一部分的数据。知道如何选择额外的数据吗?
谢谢,
最佳答案
当请求额外的 OAuth 2.0 范围时,Firebase V3 不会返回额外请求的数据。您需要做的是检索返回的凭证(signInWithPopup 和 getRedirectResult 提供),然后在凭证中使用 Google accessToken 调用 google api 来请求附加数据。
关于Firebase 3 - 其他身份验证范围数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37618332/