如何修复或更改django social auth的“开始过程”中的重定向URL

我正在使用django-social,问题是当我想通过使用以下请求开始使用google-oauth2进行身份验证的过程时:

http://example.com:8080/social-auth/login/google-oauth2/

它将收到来自Google的不匹配错误, 由于我的Django应用程序通过端口运行,因此发生了错误,

但是我可以看到对Google的真正要求是这样的:

https://accounts.google.com/o/oauth2/auth?client_id=XXX&redirect_uri=http://example.com/social-auth/complete/google-oauth2/&state=xxx&response_type=code&scope=openid+email+profile

很明显

  

redirect_uri   被设置为http://example.com/social-auth/complete/google-oauth2/   我的意思是没有端口。

在上述请求中,redirect_uri与我在google-console中设置的用于重定向的内容不同,在Google控制台中,我设置了http://example.com:8080/social-auth/complete/google-oauth2,因为我的应用程序正在使用port:8080运行

那我可以告诉社交身份验证设置重定向网址的设置是什么?

此外,我的Django应用由docker-composer文件运行。

daibin0715 回答:如何修复或更改django social auth的“开始过程”中的重定向URL

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3161598.html

大家都在问