如何更改重定向uri? Django-Allauth

时间:2019-05-22 23:50:32

标签: django redirect dns uri allauth

我正在尝试使用Allauth与Google进行身份验证,但是出现了uri不匹配错误。该应用当前位于域为ex的开发服务器上。 live.example.com。我可以在Google应用程序设置和django应用程序中将域更改为localhost,并且一切正常。我正在尝试将我的域与Allauth一起使用,但无法正常工作

我尝试更改site_id并为此设置不同的值。我能够使用Allauth的响应并手动添加域,并且一切正常。但是,在发送请求时,它将URL设置为localhost,因为它不理解代理。

    Error: redirect_uri_mismatch

The redirect URI in the request, http://localhost:5500/accounts/google/login/callback/, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: https://console.developers.google.com/apis/credentials/oauthclient/XXXXXX288-gm2jiuh2o8XXXXXXXXXcc6n11d4j5sr.apps.googleusercontent.com?project=5XXXX82XX

Learn more

Request Details
client_id=X9XXXXX82X8-gXXXXh2o88ejglkXXXcc6n11d4j5sr.apps.googleusercontent.com
redirect_uri=http://localhost:5500/accounts/google/login/callback/
scope=email profile
response_type=code
state=XXXtpODloQK
access_type=online

0 个答案:

没有答案