-
Notifications
You must be signed in to change notification settings - Fork 57
Document how to setup Discord as upstream OAuth 2.0 provider, add missing token_endpoint_auth_method
field in GitHub sample config
#4310
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
Changes from all commits
ecef762
9f925e6
f958e61
6eb671a
75196ec
7964e55
65f4c4d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -339,6 +339,7 @@ upstream_oauth2: | |||||||||||||||||||||||||||
human_name: Google | ||||||||||||||||||||||||||||
brand_name: "google" | ||||||||||||||||||||||||||||
issuer: "https://accounts.google.com" | ||||||||||||||||||||||||||||
token_endpoint_auth_method: "client_secret_post" | ||||||||||||||||||||||||||||
client_id: "<client-id>" # TO BE FILLED | ||||||||||||||||||||||||||||
client_secret: "<client-secret>" # TO BE FILLED | ||||||||||||||||||||||||||||
scope: "openid profile email" | ||||||||||||||||||||||||||||
|
@@ -451,6 +452,40 @@ upstream_oauth2: | |||||||||||||||||||||||||||
template: "{{ user.preferred_username }}" | ||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
### Discord | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
1. Create a new application in the Discord Developer Portal (see [documentation](https://discord.com/developers/applications)) | ||||||||||||||||||||||||||||
2. Add the following "Redirect URI" in the OAuth2 tab under settings: `https://<auth-service-domain>/upstream/callback/<id>` | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
Authentication service configuration: | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
```yaml | ||||||||||||||||||||||||||||
upstream_oauth2: | ||||||||||||||||||||||||||||
providers: | ||||||||||||||||||||||||||||
- id: 01JQK7DK6VFH62NMW4HS9RKD3R | ||||||||||||||||||||||||||||
human_name: Discord | ||||||||||||||||||||||||||||
brand_name: "discord" | ||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add this in the comment here: matrix-authentication-service/crates/config/src/sections/upstream_oauth2.rs Lines 424 to 436 in bcaa783
and then regenerate the config schema with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||||||||||||||||||||||||
token_endpoint_auth_method: "client_secret_post" | ||||||||||||||||||||||||||||
issuer: "https://discord.com" | ||||||||||||||||||||||||||||
client_id: "<client-id>" # TO BE FILLED | ||||||||||||||||||||||||||||
client_secret: "<client-secret>" # TO BE FILLED | ||||||||||||||||||||||||||||
fetch_userinfo: true | ||||||||||||||||||||||||||||
userinfo_endpoint: "https://discord.com/api/users/@me" | ||||||||||||||||||||||||||||
scope: "openid identify email" | ||||||||||||||||||||||||||||
claims_imports: | ||||||||||||||||||||||||||||
localpart: | ||||||||||||||||||||||||||||
action: suggest | ||||||||||||||||||||||||||||
template: "{{ user.username }}" | ||||||||||||||||||||||||||||
displayname: | ||||||||||||||||||||||||||||
action: suggest | ||||||||||||||||||||||||||||
template: "{{ user.global_name }}" | ||||||||||||||||||||||||||||
email: | ||||||||||||||||||||||||||||
action: suggest | ||||||||||||||||||||||||||||
template: "{{ user.email }}" | ||||||||||||||||||||||||||||
account_name: | ||||||||||||||||||||||||||||
template: "{{ user.username }}" | ||||||||||||||||||||||||||||
``` | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
### Rauthy | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd appreciate this to be either in a separate PR, or if you renamed the PR accordingly (as this is what ends up in the changelog)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've renamed the PR. Will try to keep it cleaner next time..