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

Authlib httpx integration does not pass realm through. #339

Closed
schinckel opened this issue Apr 21, 2021 · 5 comments
Closed

Authlib httpx integration does not pass realm through. #339

schinckel opened this issue Apr 21, 2021 · 5 comments
Assignees
Labels

Comments

@schinckel
Copy link

The documentation for authlib.integrations.httpx_client.OAuth1Client suggests it supports passing in a realm argument, but it actually calls it OAuth1Session, which probably means it is a copy-paste from the requests section.

https://docs.authlib.org/en/latest/client/api.html?highlight=realm#authlib.integrations.httpx_client.OAuth1Client.fetch_request_token

Anyway, this value is not passed through to the underlying OAuth1Auth object, meaning my authentication was failing.

(My workaround is to set the client.auth.realm after instantiation, but it's still a bit of a PITA).

@lepture
Copy link
Owner

lepture commented Apr 27, 2021

Request and httpx are sharing the same fetch_request_token method in authlib.oauth1.client.

@schinckel
Copy link
Author

Ah, so the documentation is auto-generated.

@schinckel
Copy link
Author

Okay, so it seems like fetch_access_token would use the realm that is supplied as a kwarg, but other requests do not?

@11philip22
Copy link

I have the same issue. But setting client.auth.realm does not seem to work for me. It sets the oauth key in the header but my authentication still fails......

@lepture
Copy link
Owner

lepture commented Nov 1, 2022

Already fixed.

@lepture lepture closed this as completed Nov 1, 2022
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

3 participants