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

httpx OAuth2 client has incorrect oauth_error_class #620

Open
axonxorz opened this issue Jan 16, 2024 · 0 comments
Open

httpx OAuth2 client has incorrect oauth_error_class #620

axonxorz opened this issue Jan 16, 2024 · 0 comments
Assignees
Labels

Comments

@axonxorz
Copy link

axonxorz commented Jan 16, 2024

Describe the bug

OAuth2Client of the httpx integration incorrectly sets oauth_error_class as OAuthError, despite the superclass authlib.oauth2.client.OAuth2Client configuring it as OAuth2Error

To Reproduce

from authlib.integrations.httpx_client import OAuth2Client
from authlib.integrations.base_client import OAuthError
from authlib.oauth2 import OAuth2Error

class MyClient(OAuth2Client):
    pass

assert MyClient.oauth_error_class is OAuthError
assert MyClient.oauth_error_class is OAuth2Error  # AssertionError

Expected behavior

OAuth2Client.oauth_error_class = OAuth2Error

Environment:

  • OS: Linux 6.5.12-100.fc37.x86_64 SMP PREEMPT_DYNAMIC Mon Nov 20 22:28:44 UTC 2023 x86_64
  • Python Version: Linux 6.5.12-100.fc37.x86_64 SMP PREEMPT_DYNAMIC Mon Nov 20 22:28:44 UTC 2023 x86_64
  • Authlib Version: 1.3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants