openid_client
openid_client copied to clipboard
How to set token_endpoint_auth_method
I must use a hydra enpoint. Getting this error all the time:
Unhandled Exception: OpenIdException(invalid_client): Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method). The OAuth 2.0 Client supports client authentication method 'client_secret_basic', but method 'client_secret_post' was requested. You must configure the OAuth 2.0 client's 'token_endpoint_auth_method' value to accept 'client_secret_post'.
Here an issue on hydra https://github.com/ory/hydra/discussions/2671
Any suggestion for me?
Hi @erik-seifert ,
I have no experience with hydra. By default, the openid_client discovers the endpoints by doing an http request to $baseIssuerUrl/.well-known/openid-configuration. So, if this does not contain the correct values, there is probably an issue with the hydra configuration. If necessary, when the openid-configuration endpoint does not return correct info, you can also define the issuer metadata as follows:
var issuer = Issuer(OpenIdProviderMetadata.fromJson({
...
});