Erisa / discord-oidc-worker

Sign into Discord on Cloudflare Access, powered by Cloudflare Workers!
MIT License
156 stars 24 forks source link

Use guild member scope for roles #3

Closed Lulalaby closed 10 months ago

Lulalaby commented 1 year ago

We could use the guilds.members.read scope to access /users/@me/guilds/{guild.id}/member which returns roles.

Erisa commented 1 year ago

I didn't know a scope like that existed - is there any documentation for it?

Erisa commented 1 year ago

Ah I found it - https://discord.com/developers/docs/resources/user#get-current-user-guild-member

Lulalaby commented 1 year ago

Yep yep <3 If you want, I can pr it. Playing anyways rn with it

Erisa commented 1 year ago

Feel free - just make sure the README is updated accordingly if bot token requirements are scrapped.

My only concern reading through it is the potential privacy concerns people might have about the fact the application can now access all their information across all the guilds rather than just the ones its a part of: image

To that end perhaps there can be an option in the Worker to either do it this way or do it the current way with a bot token?

If you want to talk more realtime about it feel free to message me (Erisa#9999) on Discord, you can join gg/cloudflaredev if we have no mutual servers.

Lulalaby commented 1 year ago

we sure have mutuals :D

0xcaff commented 3 months ago

I tried to get ppl in my discord to adopt this sign in mechanism but the all information across all guilds permission was a dealbreaker for folks. It would be awesome there was some way to relax this permission.

Thanks for building this, its makes it really easy to build stuff around discord servers.