fix(core): Report missing SAML attributes early with an actionable error message (#9316)

This commit is contained in:
Danny Martini
2024-05-07 10:27:44 +02:00
committed by GitHub
parent ff317490a2
commit 225fdbb379
2 changed files with 54 additions and 1 deletions

View File

@@ -359,7 +359,7 @@ export class SamlService {
if (!attributes) {
throw new AuthError('SAML Authentication failed. Invalid SAML response.');
}
if (!attributes.email && missingAttributes.length > 0) {
if (missingAttributes.length > 0) {
throw new AuthError(
`SAML Authentication failed. Invalid SAML response (missing attributes: ${missingAttributes.join(
', ',