wadahiro / keycloak-discord

Keycloak Identity Provider extension for Discord
121 stars 64 forks source link

Additional information from Discord #22

Closed PredictionKing closed 2 years ago

PredictionKing commented 2 years ago

Maybe I'm in the wrong place with this question, but is there a way to map additional information like the Discord user's language or the profile picture url as attributes for the Keycloak user?

PredictionKing commented 2 years ago

I have solved my problem. For those who have a similar problem, here is a quick guide:

In order to map information such as the language or the profile picture with user attributes, the correct scope must be set, for example, identify and email.

Also, make sure you select the correct "Sync Mode Override" (the descriptions for this are hidden in the tooltip). In my case I had the problem that I had set it to "inherit". However, since I had already created my test user, the new value was not adopted no matter what changes I made. Now I have set the mode to "force" to always transfer the latest changes from Discord to Keycloak. In addition, the correct designation of the attribute is important. For example, the documentation says "locale?" for the language, but the correct json only says "locale".

If you take these things into account, mapping attributes from Discord runs without problems. I hope this little guide can help other users with the same problem.