django - 尽管 url 正确,Django-allauth URL 返回 github 的回调错误
问题描述
我正在尝试在我的 django 项目中使用 Github 实现 all-auth。我已经按照 本教程设置了回调 url。到目前为止,即使出现了 github 的登录页面,它也没有正确回调,并且我在 url 中收到此错误
这是该项目的 github 存储库。
http://127.0.0.1:8000/accounts/github/login/callback/ 是我按照教程设置的授权回调 url。
欢迎任何关于为什么回调 url 不起作用的见解。谢谢。
解决方案
如果您在 GitHub UI 中使用 https 协议定义了授权回调,则此设置可以解决问题:ACCOUNT_DEFAULT_HTTP_PROTOCOL='https'
这来自此处找到的答案:Django allauth google OAuth redirect_uri_mismatch error
推荐阅读
- amazon-redshift - 哪个选项最适合选择列压缩编码 [COPY VS ANALYZE COMPRESSION]
- drupal - Drupal 与 xero 的集成
- python-3.x - 预期类型 int 在 Pycharm 中浮动
- java - 从 XPath 查询中获取空值
- leaflet - 使用 font awesome 自定义 react-leaflet 标记图标
- elasticsearch - Elasticsearch 聚合相当困难
- sql - 使用三列的自定义代码在 SSRS 2008 R2 中拆分字符串
- python - 在 Keras/TensorFlow 中使用纯 numpy 度量作为度量
- r - curl 包不适用于几个 R 包
- html - php如何计算帖子并将其显示为html中的“(5/1)”