oidc: use the username for mapping

This commit is contained in:
Johannes Zellner
2023-03-17 14:20:21 +01:00
parent 260925229a
commit a832a95a62

View File

@@ -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,