Unverified Commit 764d98fa authored by Simon Lichtinghagen's avatar Simon Lichtinghagen Committed by GitHub

fix: use fullname from keycloak profile info with username as fallback (#1888)

parent 1efdd6dd
......@@ -21,12 +21,16 @@ module.exports = {
clientSecret: conf.clientSecret,
callbackURL: conf.callbackURL
}, async (accessToken, refreshToken, profile, cb) => {
let displayName = profile.username
if (_.isString(profile.fullName) && profile.fullName.length > 0) {
displayName = profile.fullName
}
try {
const user = await WIKI.models.users.processProfile({
profile: {
id: profile.keycloakId,
email: profile.email,
name: profile.username,
name: displayName,
picture: ''
},
providerKey: 'keycloak'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment