Fix blocking issue for auth admin bypass on selectOrganization

This commit is contained in:
Carlos Monastyrski
2025-09-02 18:26:33 -03:00
parent a6b4939ea5
commit ecfc8b5f87

View File

@@ -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."