我尝试使用Firebase设置Google Auth,但得到:
{
"code": "auth/invalid-credential",
"message": "The supplied auth credential is malformed or has expired."
}
在“网络”标签中,我注意到了
{
"error": {
"code": 400,
"message": "INVALID_IDP_RESPONSE : Error getting access token from google.com, OAuth2 redirect uri is: https://....firebaseapp.com/__/auth/handler, response: OAuth2TokenResponse{params: error=invalid_client&error_description=Unauthorized, httpMetadata: HttpMetadata{status=401, cachePolicy=NO_CACHE, cacheDuration=null, cacheImmutable=false, staleWhileRevalidate=null, filename=null, lastModified=null, headers=HTTP/1.1 200 OK\r\n\r\n, contentSecurityPolicies=[], cookieList=[]}}",
"errors": [
{
"message": "INVALID_IDP_RESPONSE : Error getting access token from google.com, OAuth2 redirect uri is: https://....firebaseapp.com/__/auth/handler, response: OAuth2TokenResponse{params: error=invalid_client&error_description=Unauthorized, httpMetadata: HttpMetadata{status=401, cachePolicy=NO_CACHE, cacheDuration=null, cacheImmutable=false, staleWhileRevalidate=null, filename=null, lastModified=null, headers=HTTP/1.1 200 OK\r\n\r\n, contentSecurityPolicies=[], cookieList=[]}}",
"domain": "global",
"reason": "invalid"
}
]
}
}
此刻我正在localhost上进行测试,如何使它起作用?在授权域下,我已经看到了localhost。怎么了?