In the authlib library, I noticed that the _render method is called twice in the following code block when using the OAuth1Auth plugin for httpx. This results in duplicated OAuth parameters for the URL, which may cause unexpected behavior.
uri, headers, body = self._render(uri, headers, body, oauth_params)
sig = self.get_oauth_signature(method, uri, headers, body)
oauth_params.append(('oauth_signature', sig))
uri, headers, body = self._render(uri, headers, body, oauth_params)
I am using the OAuth1Auth plugin with httpx as follows:
The request is incomplete or incorrect;
Response: oauth_problem=parameter_rejected
oauth_parameters_rejected=oauth_nonce%3DEBDB7Xv5JUgkH3Qj6djMHFQjaainjU
To Reproduce
Install the authlib library
Set up the OAuth1Auth with the required credentials plugin for httpx
Call the endpoint that utilizes the above code snippet
Observe the duplicated OAuth parameters in the generated URL
Expected behavior
The _render method should be called only once, and the OAuth parameters should not be duplicated in the URL.
Describe the bug
In the
authlib
library, I noticed that the_render
method is called twice in the following code block when using theOAuth1Auth
plugin forhttpx
. This results in duplicated OAuth parameters for the URL, which may cause unexpected behavior.I am using the
OAuth1Auth
plugin withhttpx
as follows:Error Stacks
To Reproduce
authlib
libraryOAuth1Auth
with the required credentials plugin forhttpx
Expected behavior
The
_render
method should be called only once, and the OAuth parameters should not be duplicated in the URL.Environment: