Django all-auth Slack:将 URL 重定向为 https 而不是 http 和社交网络登录失败

man*_*ugo 2 python django oauth django-allauth slack-api

你好,我正在使用django all-authSlack。但是,我有两个问题。

第一:重定向 URL 始终转到 HTTP 而不是 HTTPS。例如,我单击 ***.ngrok.io/accounts/slack/login,然后被重定向到,https://***.slack.com/oauth?client_id=1737791866593.2107881969061&scope=identify&user_scope=&redirect_uri=http%3A%2F%2F***.ngrok.io%2Faccounts%2Fslack%2Flogin%2Fcallback%2F&state=ANmZKE1CMWq7&granular_bot_scope=0&single_channel=0&install_redirect=&tracked=1&response_type=code&team=如您所见,redirect_uri 是 HTTP。我怎样才能改变这个django all-auth错误描述

第二:手动更改后,我仍然无法登录,因为出现以下错误(见图): 第二个错误

例如https://django-allauth.readthedocs.io/en/latest/providers.html#slack

Rok*_*iša 5

您需要将以下 allauth 配置添加到您的settings.py

ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'https'
Run Code Online (Sandbox Code Playgroud)