-
Notifications
You must be signed in to change notification settings - Fork 327
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 a provider for Discord #312
Comments
@eltariel thanks for bringing the conversation here Just to clarify, your Discord setup is able to capture the user info and pass them as headers in Nginx via Is that using custom javascript glue code? |
Here's the Reddit thread regarding using Vouch Proxy + Discord to log into Foundry VTT where we began this conversation. I find that use case quite compelling. https://www.reddit.com/r/FoundryVTT/comments/hw14rr/anyone_else_using_container/fz5jocz/?context=3 @eltariel thanks again for offering your configs! |
Yes, that’s correct. Some extra context: I’ve built a small asp.net app to manage authorisation based on these headers: eltariel/FoundryLanding. This uses a bunch of metadata inserted into the Foundry VTT data files to determine what a given discord user has access to for each foundry instance. This is referenced as the top level domain but also gets injected into each of the subdomains used for the fvtt instances so that it can override the login flow.
Looking back at my config (I’m a beginner at nginx!) I believe that the configuration directives in this file are only required because I’ve accidentally double-proxied the auth helper in the fvtt domains. It’s not needed for the top-level domain to work. I could probably get rid of it altogether if I used the localhost URL in the Hope this helps? |
It would be nice to have a way to configure the username extraction out of the user info response via the config file, perhaps using a Go template. By default, Discord does not return the email address. It can be asked to do so, with an additional scope, but most Discord users are accustomed to identifying users by their username and discriminator, which are usually formatted like so: Discord also provides an unchangeable "Snowflake" identifier as the Therefore, if I wanted to use the unchangeable I would imagine such a flexible id extraction system could be useful with a lot of different providers. |
Given the updates to the way Discord is formatting usernames going forward I think this PR maintains the patterns of other providers expectations for the discord platform: #528 |
I've used the
oidc
provider to authenticate with Discord, but discord isn't properly OIDC compliant, in particular it's missing the requiredsub
claim on the user endpoint, and the fields that are most useful for identifying a user in discord aren't exposed by default.I've created a set of configs (here: eltariel/foundry-docker-nginx-vouch) which works reasonably well but it'd be nice to have something that works out-of-the-box.
The text was updated successfully, but these errors were encountered: