Django allauth使用谷歌帐户登录

时间:2013-07-01 21:14:13

标签: api django-allauth

我正在使用django-allauth并尝试通过gmail帐户登录我的网站。我已经设置了api

Google API

Redirect URIs:  https://tutor.herokuapp.com/accounts/google/login/callback
JavaScript origins: https://tutor.herokuapp.com

但是当我点击Google链接登录时,我收到了错误

Error: redirect_uri_mismatch
The redirect URI in the request: http://tutor.herokuapp.com/accounts/google/login/callback/ did not match a registered redirect URI

由于Twitter和Facebook登录成功,我不知道我出错的地方。帮助请

1 个答案:

答案 0 :(得分:2)

您已配置HTTPS重定向URI,而您的Django应用程序正在使用HTTP URI。 在Google API控制台上添加http://tutor.herokuapp.com/accounts/google/login/callback,或在Django项目中使用HTTPS。

相关问题