Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Improve error message

Carlos Monastyrski41404148e15b
diff --git a/backend/src/services/auth/auth-login-service.ts b/backend/src/services/auth/auth-login-service.ts
index e2d628c998..0e5ed2ad90 100644
--- a/backend/src/services/auth/auth-login-service.ts
+++ b/backend/src/services/auth/auth-login-service.ts
@@ -457,11 +457,10 @@ export const authLoginServiceFactory = ({
if (
selectedOrg.authEnforced &&
!isAuthMethodSaml(decodedToken.authMethod) &&
- decodedToken.authMethod !== AuthMethod.OIDC &&
- decodedToken.authMethod !== AuthMethod.GOOGLE
+ decodedToken.authMethod !== AuthMethod.OIDC
) {
throw new BadRequestError({
- message: "Authentication is required by your organization before you can log in."
+ message: "Login with the auth method required by your organization."
});
}