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

Django all-auth Slack: Redirect URL as https instead of http and Social Network Login Failure

您好,我正在使用 django all-auth 和 Slack。但是,我有两个问题。

1st:重定向 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 中更改此设置?

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

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

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

ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'https'