简体   繁体   English

无法创建新的 Microsoft 用户 Firebase Auth

[英]Unable to create new Microsoft user Firebase Auth

I have implemented Google Auth correctly in my web app, but I'm having issues with Microsoft Auth.我在我的 web 应用程序中正确实施了 Google Auth,但我在使用 Microsoft Auth 时遇到问题。 When implemented following the instructions from Firebase Docs , I can see the redirect correctly, but when it redirects back to the app, I get the following error:按照Firebase Docs的说明实施时,我可以正确看到重定向,但是当它重定向回应用程序时,出现以下错误:

auth.esm.js:221 POST https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyAssertion?key=AIzaSyBam7rlhnpdofW0BkLXBIgZLBPfzL7akqA 400

In Firebase Console, Microsoft Auth is enabled and configured在 Firebase 控制台中,启用并配置了 Microsoft Auth

Just in case someone has this error in the future: The full error message was以防万一以后有人遇到此错误:完整的错误消息是

    "message": "INVALID_IDP_RESPONSE : Error getting access token from microsoft.com, OAuth2 redirect uri is: https://[app].firebaseapp.com/__/auth/handler, response: OAuth2TokenResponse{params: error=invalid_client&error_description=AADSTS7000215:%20Invalid%20client%20secret%20is%20provided.%0D%0ATrace%20ID:%20eeb1ec6a-d835-4338-bd71-51f414ed8d00%0D%0ACorrelation%20ID:%20050706e3-97aa-4f13-b0a9-a55bb3a9aae8%0D%0ATimestamp:%202021-08-25%2018:47:47Z&timestamp=2021-08-25%2018:47:47Z&trace_id=[id]&correlation_id=[id]8&error_uri=https://login.microsoftonline.com/error?code%3D7000215, httpMetadata: HttpMetadata{status=401, cachePolicy=NO_CACHE, cacheDurationJava=null, cacheImmutable=false, staleWhileRevalidate=null, filename=null, lastModified=null, retryAfter=null, crossOriginEmbedderPolicy=null, crossOriginOpenerPolicy=null, crossOriginResourcePolicy=null, headers=HTTP/1.1 200 OK\r\n\r\n, contentSecurityPolicies=[], originTrials=[], varyHeaderNames=[], cookieList=[]}}",

The key is 'ADSTS7000215: Invalid client secret is provided.'密钥是“ADSTS7000215:提供了无效的客户端密码。” It turns out I was setting the Id Secret instead of the value of the secret.事实证明我设置的是 Id Secret 而不是秘密的值。 在此处输入图像描述 It works completely fine after I changed it.我更改后它完全可以正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 React Native:尝试创建新用户时出现 firebase auth/network-request-failed 错误,但在登录时却没有? - React Native: firebase auth/network-request-failed error when trying to create a new user, but not on login? 可以创建“交易”以通过 firebase 身份验证添加新用户并写入 firestore? - Possible to create 'transaction' for adding new user via firebase auth and writing to firestore? Firebase Auth 验证此用户 - Firebase Auth verify this user 用户 Google Api 与 Firebase 身份验证 - User Google Api with Firebase auth 持久化用户Auth Flutter Firebase - Persist user Auth Flutter Firebase 无法解析 moudle firebase/auth - Unable to resolve moudle firebase/auth Javascript Vue 3 - 在创建新的身份验证帐户到 Firebase Auth 后无法将图像上传到 Firebase 存储 - Javascript Vue 3 - Cannot upload image to Firebase Storage after create new authentication account to Firebase Auth Firebase Microsoft 社交身份验证未提供 photoUrl - Firebase Microsoft social auth not providing photoUrl 多少次 Firebase Auth 在 UserCredentail.additionalUserInfo.?isNewUser 中考虑新用户或非新用户? - how much times Firebase Auth takes to consider a user that is new or not in the UserCredentail.additionalUserInfo!.isNewUser? 删除 firebase auth with angular 中的一个用户 - Delete an user in firebase auth with angular
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM