Skip to content

Conversation

ChurchOfTheSubgenius
Copy link
Contributor

The sample config for Github is missing the token_endpoint_auth_method field. Mas-cli won't sync config unless the field exists, and errors with:

Error: missing field `token_endpoint_auth_method` for key "default.upstream_oauth2.providers.0" in config.yaml YAML file

Adding token_endpoint_auth_method: "client_secret_post" fixes it.

@CLAassistant
Copy link

CLAassistant commented Mar 30, 2025

CLA assistant check
All committers have signed the CLA.

@ChurchOfTheSubgenius
Copy link
Contributor Author

I've added sample upstream config for Discord, and a brand logo svg. Probably should have been a separate PR...

template: "{{ user.preferred_username }}"
```

### Discord
Copy link
Member

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)

Copy link
Contributor Author

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..

providers:
- id: 01JQK7DK6VFH62NMW4HS9RKD3R
human_name: Discord
brand_name: "discord"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add this in the comment here:

/// A brand identifier used to customise the UI, e.g. `apple`, `google`,
/// `github`, etc.
///
/// Values supported by the default template are:
///
/// - `apple`
/// - `google`
/// - `facebook`
/// - `github`
/// - `gitlab`
/// - `twitter`
#[serde(skip_serializing_if = "Option::is_none")]
pub brand_name: Option<String>,

and then regenerate the config schema with sh misc/update.sh

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@ChurchOfTheSubgenius ChurchOfTheSubgenius changed the title Missing token_endpoint_auth_method field in upstream sample config Add Discord as a default upstream oauth2 provider, Add missing token_endpoint_auth_method field in Github sample config Apr 6, 2025
@sandhose sandhose merged commit a4ab2ef into element-hq:main Apr 6, 2025
20 checks passed
@sandhose sandhose added A-Documentation Improvements or additions to documentation T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. labels Apr 14, 2025
@sandhose sandhose changed the title Add Discord as a default upstream oauth2 provider, Add missing token_endpoint_auth_method field in Github sample config Document how to setup Discord as upstream OAuth 2.0 provider, add missing token_endpoint_auth_method field in GitHub sample config Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Documentation Improvements or additions to documentation T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants