From 7c47ab560e31f9d16587e30d9a46a17e73a7b32e Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 30 Dec 2022 14:02:00 -0500 Subject: [PATCH] fix: Add check for 'name' returned from OIDC provider, closes #4453 --- server/routes/auth/providers/oidc.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/routes/auth/providers/oidc.ts b/server/routes/auth/providers/oidc.ts index dabcaebf3..fab35dfa5 100644 --- a/server/routes/auth/providers/oidc.ts +++ b/server/routes/auth/providers/oidc.ts @@ -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);