[英]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×tamp=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.