wadahiro / keycloak-discord

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

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

Open sfxworks opened 4 years ago

sfxworks commented 4 years ago

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

kywan commented 3 years ago

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

kywan commented 3 years ago

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

williamhatcher commented 2 years ago

@sfxworks can this issue be closed?

wadahiro commented 2 years ago

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.

hydridity commented 2 years ago

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).