【发布时间】:2021-11-21 00:10:22
【问题描述】:
我已将自定义 OIDC 提供程序添加到我的 Google 身份平台。我可以成功地使用它进行身份验证,所以我知道这不是提供程序配置的问题,但是由于某种原因,当我尝试向令牌请求添加其他范围时,新范围不会出现在请求 url 中。在下面的代码块中,我看到 OAuthProvider 对象显示了我在请求 signInWithPopup 之前添加的其他范围。但是在此请求之后,当我验证收到的令牌时,它只有“oidc”范围,并且其他范围不会出现在弹出窗口的 URL 中。我是否遗漏了一些额外的步骤,或者其他范围不适用于 Firebase 身份验证中的自定义 OIDC 提供程序?
let twitch = new firebase.auth.OAuthProvider('oidc.twitch');
twitch.addScope('moderation:read');
twitch.addScope('user:edit');
console.log(twitch); // This shows the additional scopes requested
const user = await this.auth.signInWithPopup(twitch); // This URL only shows the oidc scope
console.log(user); // This user token does not have any additional scopes
在我必须自己进行身份验证之前,感谢任何帮助或确认。谢谢,
【问题讨论】:
-
我遇到了同样的问题,没有关于这个的信息:(
-
当我检查 twicth 配置时,它们似乎不在列表中 id.twitch.tv/oauth2/.well-known/openid-configuration
标签: firebase firebase-authentication openid-connect angularfire google-identity