- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在 Firebase (web js sdk) 中设置 Microsoft 身份验证,但我遇到了 firebase.auth.signInWithCredential
错误。我可以从 Microsoft 成功获取 ID token ,但 Firebase 身份验证步骤失败。我已经尝试过 Firebase v8 和 v9,以及各种形成我的凭据对象的方法。事实上,即使传递访问 token ,我也会遇到同样的错误。 Firebase 库似乎有问题。有没有人遇到过这个问题并解决了它?
代码:
const { id_token } = authResponse.params; // I've verified that id_token is correct
const credential = new firebase.auth.OAuthProvider("microsoft.com").credential({
idToken: id_token,
rawNonce: "12345",
});
await firebase.auth().signInWithCredential(credential);
凭据似乎生成良好:
Object {
"accessToken": undefined,
"idToken": "eyJ0eXAiOiJKV...",
"nonce": "12345",
"pendingToken": null,
"providerId": "microsoft.com",
"secret": undefined,
"signInMethod": "microsoft.com",
}
但是 signInWithCredential
步骤出现以下错误:
Uncaught (in promise)
code: "auth/internal-error"
message: "Invalid IdP response/credential: http://localhost?id_token=eyJ0eXAiOiJKV..."
最佳答案
Microsoft OAuth 似乎不支持 signInWithCredential
。 https://cloud.google.com/identity-platform/docs/web/microsoft我将尝试为现有用户执行 signInWithCustomToken
并警告新用户首先在网络上注册,我将在网站上执行 signInWithPopup
关于javascript - Firebase Microsoft SignInWithCredential,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70268222/
我正在 Firebase (web js sdk) 中设置 Microsoft 身份验证,但我遇到了 firebase.auth.signInWithCredential 错误。我可以从 Micros
我正在尝试连接到第二个 Firebase 应用并使用 signInWithCredential() 进行身份验证,但我不知道如何为第二个应用获取有效的 idToken : connect(acce
[dart] 未为类“FirebaseAuth”定义方法“signInWithCredential”。 [undefined_method] 我的 main.dart 代码 import 'packa
问候 flutter 开发人员正在为 iOS 和 android 开发一个应用程序,它使用手机身份验证来验证用户,在 iOS 中一切正常,但对于 android,当调用此行时我收到错误: fi
我想在 Flutter 项目中使用 FirebaseAuth 链接电话和电子邮件身份验证。 步骤如下: auth = FirebaseAuth.instance; 获取用户的电话号码并使用 auth.
我在 iOS 中使用 swift 语言使用 Firebase。我正在尝试使用 Facebook 登录。我正在使用 graphRequest 获取 FBSDKAccessToken。当我使用 Faceb
我的 Facebook 登录正常,Firebase 网站上的最后 2 条说明是: let credential = FIRFacebookAuthProvider.credential(withAcc
我正在使用 react-native-facebook-login 包来登录用户。目前流程运行良好,在用户输入他们的详细信息后,我成功地看到了一个带有他们信息的对象。 当我尝试使用 signInWit
何时使用 this.afAuth.auth.signInWithCredential 在我的 Ionic 应用程序中一切正常。我可以使用 Google 身份验证登录并将用户个人资料推送到 fireba
我在使用 firebase 登录功能时遇到了这个问题,我不知道如何解决。请帮忙,谢谢。 我的登录函数代码如下: Future signIn() async{ final formState = _fo
我是一名优秀的程序员,十分优秀!