Django 如何更改重定向URI?

Django 如何更改重定向URI?,django,redirect,dns,uri,django-allauth,Django,Redirect,Dns,Uri,Django Allauth,我试图使用Allauth与Google进行身份验证,但我得到了一个URI不匹配错误。该应用程序当前位于具有域ex.live.example.com的开发服务器上。我可以在Google应用程序设置和Django应用程序中将域更改为localhost,一切正常。我试图使用我的域名与Allauth,它是不工作的 我尝试更改站点id并为此设置不同的值。我能够使用Allauth的响应,手动添加域,一切正常。但在发送请求时,它会将URL设置为localhost,因为它不理解代理 Error: red

我试图使用Allauth与Google进行身份验证,但我得到了一个URI不匹配错误。该应用程序当前位于具有域ex.live.example.com的开发服务器上。我可以在Google应用程序设置和Django应用程序中将域更改为localhost,一切正常。我试图使用我的域名与Allauth,它是不工作的

我尝试更改站点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

我也有类似的错误。在我的例子中,重定向uri似乎使用HTTP,而不是谷歌所期望的HTTPS“有效uri”。