fix(auth): fix SSO auto-login check to use strict boolean comparison and add tests
Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> Agent-Logs-Url: https://github.com/christianlouis/DocuElevate/sessions/51d9bb59-d4b5-4713-9a4a-8acfc599e2cc
This commit is contained in:
+1
-1
@@ -435,7 +435,7 @@ async def login(request: Request):
|
||||
show_oauth = OAUTH_CONFIGURED
|
||||
|
||||
# SSO Auto Login: redirect directly to SSO provider if configured
|
||||
if show_oauth and settings.sso_auto_login and not error and not message:
|
||||
if show_oauth and getattr(settings, "sso_auto_login", False) is True and not error and not message:
|
||||
return RedirectResponse(url="/oauth-login", status_code=status.HTTP_302_FOUND)
|
||||
|
||||
return templates.TemplateResponse(
|
||||
|
||||
Reference in New Issue
Block a user