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

feat(thirdparty): add discord provider #1353

Merged
merged 7 commits into from
Feb 19, 2024
Merged

Conversation

lfleischmann
Copy link
Member

@lfleischmann lfleischmann commented Feb 16, 2024

mostly copied from #1279

Description

This PR adds the Discord OAuth provider in order to support authentication via Discord.

Tests

You need a Discord account and a Discord app. Configure the redirect URL in the "OAuth2" settings of the app, get your client ID and secret and configure with Hanko as usual.

Implementation

I've copied the existing Google provider, however, Discord avatar URLs have to be built based on a returned hash. I implemented this functionality on the Discord provider itself even though it does not rely on any other provider functionality in order to keep the top-level API footprint of the package low.

In addition, I've also setup the Discord icon in the frontend elements and updated the configuration documentation to reflect the new third_party.providers.discord config object.

Todos

The documentation site still needs to be updated. I didn't update the docs/ within this repository as it doesn't seem to be the currently active documentation site. If I need to update the docs within this repository, please let me know.

@lfleischmann lfleischmann marked this pull request as draft February 16, 2024 17:15
@lfleischmann lfleischmann marked this pull request as ready for review February 19, 2024 10:32
@lfleischmann lfleischmann merged commit 7d57bf6 into main Feb 19, 2024
12 checks passed
@lfleischmann lfleischmann deleted the feat-thirdparty-discord branch February 19, 2024 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants