feat: updated saml error message on missing email or first name attribute

This commit is contained in:
=
2025-01-07 21:17:25 +05:30
parent b726187ba3
commit baac87c16a

View File

@@ -123,7 +123,10 @@ export const registerSamlRouter = async (server: FastifyZodProvider) => {
`email: ${email} firstName: ${profile.firstName as string}`
);
throw new Error("Invalid saml request. Missing email or first name");
throw new BadRequestError({
message:
"Invalid saml request. Missing email or first name. Please double check your SAML attribute mapping."
});
}
const userMetadata = Object.keys(profile.attributes || {})