【问题标题】:Django - Social Auth (Request URL is showing http instead of https)Django - 社交身份验证(请求 URL 显示 http 而不是 https)
【发布时间】:2019-01-14 02:54:45
【问题描述】:

我在我的应用程序中集成了 SSL 证书,并且我的站点中有 https,但在 django social auth 中,请求 URL 仅与 http 一起使用。 我知道 Twitter 不允许来自 http 的请求。链接:http://humbusy.tk/social-auth/login/twitter/

我的网站有 https 但请求使用 http 。为什么?我该如何解决?谢谢。

【问题讨论】:

  • 它显示403 Client Error你设置clientidclient secret正确吗?
  • 好吧,我们必须在我们的应用程序中添加消费者密钥和秘密。?我已经做到了。
  • 在 Twitter 应用程序中选择设置选项卡以配置回调 URL,添加此 https://humbusy.tk/complete/twitter/
  • 完成.. 结果相同。
  • 尝试重启服务器后检查或关注此link

标签: python django authentication ssl twitter-oauth


【解决方案1】:

因为你的urls.py 看起来很关注。

urlpatterns = [url(r'social-auth/', include('social_django.urls', namespace='social')) ] 

您已在 Twitter 应用配置中添加回调 URL,如下所示。

https://humbusy.tk/social-auth/complete/twitter/
http://humbusy.tk/social-auth/complete/twitter/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-03
    • 2020-08-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多