From 3dd1613fffce119f04529fa1aa6fa08fdbb7ce4e Mon Sep 17 00:00:00 2001 From: Aditya Bansal Date: Wed, 1 Aug 2018 13:18:52 +0530 Subject: [PATCH] auth: Add 'auth' subdomain to ROOT_SUBDOMAIN_ALIASES list. This makes it easy to use the recommended/default value of SOCIAL_AUTH_SUBDOMAIN without having to edit ROOT_SUBDOMAIN_ALIASES. --- zproject/prod_settings_template.py | 4 ++++ zproject/settings.py | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/zproject/prod_settings_template.py b/zproject/prod_settings_template.py index 6da068e1ac..20acacf72c 100644 --- a/zproject/prod_settings_template.py +++ b/zproject/prod_settings_template.py @@ -168,6 +168,10 @@ AUTHENTICATION_BACKENDS = ( # subdomain; if you're using this setting, the "Callback URL" should be e.g.: # https://auth.zulip.example.com/complete/github/ # +# If you end up using a subdomain other then the default +# recommendation, you must also set the 'ROOT_SUBDOMAIN_ALIASES' list +# to include this subdomain. +# #SOCIAL_AUTH_SUBDOMAIN = 'auth' ######## diff --git a/zproject/settings.py b/zproject/settings.py index 6ee04c0619..489fd24593 100644 --- a/zproject/settings.py +++ b/zproject/settings.py @@ -355,7 +355,8 @@ DEFAULT_SETTINGS.update({ 'EMAIL_DELIVERER_DISABLED': False, # What domains to treat like the root domain - 'ROOT_SUBDOMAIN_ALIASES': ["www"], + # "auth" is by default a reserved subdomain for the use by python-social-auth. + 'ROOT_SUBDOMAIN_ALIASES': ["www", "auth"], # Whether the root domain is a landing page or can host a realm. 'ROOT_DOMAIN_LANDING_PAGE': False,