Skip to content

Commit f8c9b16

Browse files
Set ACCOUNT_DEFAULT_HTTP_PROTOCOL to 'http' in production
allauth redirects to GitHub for the social login using a HTTP URL by default. However the GitHub app is setup to expect a HTTPS URL. So we need to instruct allauth to use one as well. Fixes #1520.
1 parent 1f2c785 commit f8c9b16

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

readthedocs/settings/postgres.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@
6969
'github': {'SCOPE': ['user:email', 'read:org', 'admin:repo_hook', 'repo:status']}
7070
}
7171

72+
# allauth settings
73+
ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'https'
74+
7275
if not os.environ.get('DJANGO_SETTINGS_SKIP_LOCAL', False):
7376
try:
7477
from local_settings import * # noqa

0 commit comments

Comments
 (0)