JayWood / simple-discord-sso

Allow any Discord user to sign in to your website and save their discord user information for later use.
https://wordpress.org/plugins/simple-discord-sso/
5 stars 5 forks source link

New feature request #3

Open xkasprx opened 2 years ago

xkasprx commented 2 years ago

Add optional auto add to guild using guilds.join scope

JayWood commented 2 years ago

You can change the scope using the filter here - https://github.com/JayWood/simple-discord-sso/blob/843fb861abd16863bc12daefa73a0f684ea8fa8d/src/lib/Discord.php#L47

Then on login, you can add them to the guild on this hook https://github.com/JayWood/simple-discord-sso/blob/main/src/app/Authentication.php#L193 or really any other hook in the authentication process.

xkasprx commented 2 years ago

I honestly have no clue how to add that to the hook or code in php, could you point me in the right direction.