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);