【发布时间】:2017-01-05 21:10:06
【问题描述】:
我正在从 Firebase 2 和 AngularFire 1 迁移到 Firebase 3 和 AngularFire 2。使用 Firebase 2 和 AngularFire 1,我可以使用所有六个身份验证选项:Google、Facebook、Twitter、Github、电子邮件和密码,以及匿名.现在使用 Firebase 3 和 AngularFire 2,五个身份验证选项正在工作,但 Google OAuth 拒绝工作。我正在使用$scope.authObj.$signInWithPopup("google")。弹窗弹出,但随后出现错误消息:
The redirect URI in the request, https://crudiest-firebase.firebaseapp.com/__/auth/handler, does not match the ones authorized for the OAuth client.
在我的 Google Developers Console 中,我将授权重定向 URI 设置为 https://crudiest-firebase.firebaseapp.com/__/auth/handler。这是适用于 Facebook、Twitter 和 GitHub 的 URI,它与错误消息中的 URI 相同。
此错误消息已持续数天。
只是为了便于比较:
https://crudiest-firebase.firebaseapp.com/__/auth/handler // rejected redirect URI
https://crudiest-firebase.firebaseapp.com/__/auth/handler // redirect URI in console
有什么建议为什么 Google 会给我这个错误消息?
【问题讨论】:
-
有时,应用更改需要几分钟时间,请确保为您的 oauth 2.0 凭据添加授权的 Javascript 来源和授权的重定向 URI。确保两者都使用相同的项目。
标签: google-oauth angularfire firebase-authentication