authlib
authlib copied to clipboard
Authlib httpx integration does not pass realm through.
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).
Request and httpx are sharing the same fetch_request_token method in authlib.oauth1.client.
Ah, so the documentation is auto-generated.
Okay, so it seems like fetch_access_token would use the realm that is supplied as a kwarg, but other requests do not?
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......
Already fixed.