From ecfc8b5f873a28c566361638a7b77787c094c98b Mon Sep 17 00:00:00 2001 From: Carlos Monastyrski Date: Tue, 2 Sep 2025 18:26:33 -0300 Subject: [PATCH] Fix blocking issue for auth admin bypass on selectOrganization --- backend/src/services/auth/auth-login-service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/services/auth/auth-login-service.ts b/backend/src/services/auth/auth-login-service.ts index 0e5ed2ad9..4793058e9 100644 --- a/backend/src/services/auth/auth-login-service.ts +++ b/backend/src/services/auth/auth-login-service.ts @@ -457,7 +457,8 @@ export const authLoginServiceFactory = ({ if ( selectedOrg.authEnforced && !isAuthMethodSaml(decodedToken.authMethod) && - decodedToken.authMethod !== AuthMethod.OIDC + decodedToken.authMethod !== AuthMethod.OIDC && + !(selectedOrg.bypassOrgAuthEnabled && selectedOrgMembership.userRole === OrgMembershipRole.Admin) ) { throw new BadRequestError({ message: "Login with the auth method required by your organization."