Skip to content
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

Using openid NotSupportedAuthMethodError, if first in configuration is not supported #333

Closed
bvolkmer opened this issue Aug 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@bvolkmer
Copy link
Contributor

bvolkmer commented Aug 19, 2024

When using OpenID, if .well-known/openid-configuration -> token_endpoint_auth_methods_supported has an unsupported authentication method in the first place, the BaseOAuth2.__init__ raises an error httpx_oauth.oauth2.NotSupportedAuthMethodError: Auth method private_key_jwt is not supported.

This is due to OpenID.__init__ taking the first, without checking, if there are supported ones in the list.

@frankie567 frankie567 assigned frankie567 and unassigned frankie567 Aug 19, 2024
@frankie567 frankie567 added the bug Something isn't working label Aug 19, 2024
@frankie567
Copy link
Owner

frankie567 commented Aug 19, 2024

Good catch, that's indeed a problem. We should take care of looking for client_secret_basic or client_secret_post in the list before raising NotSupportedAuthMethodError.

PR welcome!

bvolkmer added a commit to bvolkmer/httpx-oauth that referenced this issue Aug 19, 2024
@bvolkmer bvolkmer mentioned this issue Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants