Added a configuration flag to force third party auth (#24789)
This adds a toggle to allow operators to prevent user registration and login via username/password authentication, forcing the platform to only support login and registration using third-party auth such as SAML. Co-authored-by: Umar Asghar <mrumarasghar@gmail.com>
This commit is contained in:
@@ -622,6 +622,8 @@ TIME_ZONE_DISPLAYED_FOR_DEADLINES = ENV_TOKENS.get("TIME_ZONE_DISPLAYED_FOR_DEAD
|
||||
TIME_ZONE_DISPLAYED_FOR_DEADLINES)
|
||||
|
||||
##### Third-party auth options ################################################
|
||||
ENABLE_REQUIRE_THIRD_PARTY_AUTH = ENV_TOKENS.get('ENABLE_REQUIRE_THIRD_PARTY_AUTH', False)
|
||||
|
||||
if FEATURES.get('ENABLE_THIRD_PARTY_AUTH'):
|
||||
tmp_backends = ENV_TOKENS.get('THIRD_PARTY_AUTH_BACKENDS', [
|
||||
'social_core.backends.google.GoogleOAuth2',
|
||||
|
||||
Reference in New Issue
Block a user