mirror of https://github.com/zulip/zulip.git
auth: Move check for social backend earlier.
This better fits the flow that we use in other auth backends.
This commit is contained in:
parent
665fc594db
commit
22b7de0ccd
|
@ -197,6 +197,9 @@ class SocialAuthMixin(ZulipAuthMixin):
|
|||
realm = kwargs.get("realm")
|
||||
if realm is None:
|
||||
return None
|
||||
if not auth_enabled_helper([self.auth_backend_name], realm):
|
||||
return_data["auth_backend_disabled"] = True
|
||||
return None
|
||||
|
||||
email_address = self.get_email_address(*args, **kwargs)
|
||||
if not email_address:
|
||||
|
@ -221,10 +224,6 @@ class SocialAuthMixin(ZulipAuthMixin):
|
|||
return_data["invalid_subdomain"] = True
|
||||
return None
|
||||
|
||||
if not auth_enabled_helper([self.auth_backend_name], realm):
|
||||
return_data["auth_backend_disabled"] = True
|
||||
return None
|
||||
|
||||
return user_profile
|
||||
|
||||
def process_do_auth(self, user_profile, *args, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue