fix: Add check for 'name' returned from OIDC provider, closes #4453

This commit is contained in:
Tom Moor
2022-12-30 14:02:00 -05:00
parent 997d796eb7
commit 7c47ab560e

View File

@@ -82,6 +82,11 @@ if (env.OIDC_CLIENT_ID && env.OIDC_CLIENT_SECRET) {
`An email field was not returned in the profile parameter, but is required.`
);
}
if (!profile.name) {
throw AuthenticationError(
`A name field was not returned in the profile parameter, but is required.`
);
}
const team = await getTeamFromContext(ctx);
const client = getClientFromContext(ctx);