This commit is contained in:
simon.franken
2026-02-18 16:08:42 +01:00
parent f5c0a0b2f7
commit 0f6e55302a
10 changed files with 29 additions and 14 deletions

View File

@@ -92,6 +92,7 @@ export async function getUserInfo(tokenSet: TokenSet): Promise<AuthenticatedUser
const id = String(claims.sub);
const username = String(userInfo.preferred_username || claims.preferred_username || claims.name || id);
const email = String(userInfo.email || claims.email || '');
const fullName = String(userInfo.name || claims.name || '') || null;
if (!email) {
throw new Error('Email not provided by OIDC provider');
@@ -100,6 +101,7 @@ export async function getUserInfo(tokenSet: TokenSet): Promise<AuthenticatedUser
return {
id,
username,
fullName,
email,
};
}