keycloak-discord icon indicating copy to clipboard operation
keycloak-discord copied to clipboard

[Feature Request] Make keycloak roles add discord roles to users

Open sfxworks opened this issue 4 years ago • 5 comments

It would be cool to see some synchronization between discord roles and keycloak roles

sfxworks avatar Jun 15 '20 09:06 sfxworks

up ! it will be great to have discord group synchronization.

kywan avatar Jan 24 '21 16:01 kywan

It would be cool to see some synchronization between discord roles and keycloak roles

i did a bot can handle this : https://github.com/kywan/keycloak-discord-roles-sync

kywan avatar Mar 12 '21 14:03 kywan

@sfxworks can this issue be closed?

williamhatcher avatar Sep 20 '21 01:09 williamhatcher

I'm sorry for the late reply. Thanks for the feature request!

As far as I know, Discord's role is not included in the identity federation. And even if it is, it can only get the role assigned to the user, not the other roles. Therefore, I think it would be difficult to achieve it with this plugin.

So, we need to use another tool like @kywan suggested.

wadahiro avatar Sep 25 '21 12:09 wadahiro

I'm sorry for the late reply. Thanks for the feature request!

As far as I know, Discord's role is not included in the identity federation. And even if it is, it can only get the role assigned to the user, not the other roles. Therefore, I think it would be difficult to achieve it with this plugin.

So, we need to use another tool like @kywan suggested.

Indeed, they are not, the only thing keycloak can get from discord oauth as identity provider is guilds that user is in. As plugin, I think this could be achieved if the plugin acted also as bot on that guild, it would only work if the bot was manually added to every guild that someone wanted to synchronize roles, also depending on way of connecting to discord as bot, writing this from scratch would require also considering rate limiting... or using existing library that has rate limits, But that could have unforeseen consequences together witch keycloak internal mechanisms (not yet sure how they works).

hydridity avatar Oct 23 '21 13:10 hydridity