openidconnect-rs
openidconnect-rs copied to clipboard
Can't use with GitHub OIDC because GitHub OIDC Discovery metadata lacks authorization_endpoint
As the title says, I can't use this library with GitHub OIDC tokens because GitHub's discovery metadata lacks authorization_endpoint.
Could it be made optional?
https://token.actions.githubusercontent.com/.well-known/openid-configuration
unfortunately, the spec defines it as a required field:
REQUIRED. URL of the OP's OAuth 2.0 Authorization Endpoint [OpenID.Core]. This URL MUST use the
httpsscheme and MAY contain port, path, and query parameter components.
since GitHub isn't following the spec, OIDC Discovery won't work out of the box. there are a few possible workarounds:
- directly construct the
Clientwithout using OIDC - fetch the provider metadata separately using any HTTP client, construct a
ProviderMetadatamanually, and then callClient::from_provider_metadata() - pass a custom HTTP client to
ProviderMetadata::discover()that adds a dummyauthorization_endpointfield to the response body