diff --git a/src/oidc.js b/src/oidc.js index 77933301e..41b1ddfdb 100644 --- a/src/oidc.js +++ b/src/oidc.js @@ -477,7 +477,7 @@ async function claims(userId, use, scope) { const lastName = nameParts.length > 1 ? nameParts[nameParts.length - 1] : ''; // choose last part, if it exists const claims = { - sub: userId, // it is essential to always return a sub claim + sub: user.username, // it is essential to always return a sub claim email: user.email, email_verified: true, family_name: lastName,