Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Discord OAuth support #134

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add Discord OAuth support #134

wants to merge 3 commits into from

Conversation

wlcx
Copy link

@wlcx wlcx commented Jul 12, 2019

  • Adds support for Discord OAuth. User Name (discord username), Email, Sub (discord username plus "discriminant", which uniquely identifies a discord user), and picture are populated.
  • In addition, a User's guilds (discord servers) are fetched and populate the Groups field. This allows ( along with userlist.yaml) authorizing users based on their membership of discord servers.
  • Minor linting
  • Parse a provider's OAuth URLs when generating a config, allowing them to contain extra parameters. This was needed to support discord's prompt parameter1

closes: #119

wlcx added 3 commits July 12, 2019 13:47
Parse the provided Auth/Token URLs, resulting in an error at start if
they are invalid.
This allows a provider's auth URL to include additional parameters,
which is needed to implement Discord auth.
Adds support for Discord as an OAuth provider.
Fetches user info and also the guilds (servers) that user is a member
of, and returns the IDs of said servers as the Groups userinfo
attribute. This allows, in conjunction with userfile, to authenticate
users based on their membership of discord servers.
@coveralls
Copy link

Coverage Status

Coverage decreased (-2.5%) to 89.007% when pulling 314fd01 on wlcx:master into 5707da9 on tarent:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discord OAuth2
2 participants