Skip to content

Commit

Permalink
GH-37: Fix invalid_client KOE010 issue (GH-39)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtyomVancyan committed Mar 14, 2024
2 parents 24f890d + fa12536 commit 4d565f4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/fastapi_oauth2/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ async def token_data(self, request: Request, **httpx_client_args) -> dict:
scheme = "http" if request.auth.http else "https"
authorization_response = re.sub(r"^https?", scheme, str(request.url))

oauth2_query_params = dict(redirect_url=redirect_uri, authorization_response=authorization_response)
oauth2_query_params = dict(
redirect_url=redirect_uri,
client_secret=self.client_secret,
authorization_response=authorization_response,
)
oauth2_query_params.update(request.query_params)

token_url, headers, content = self._oauth_client.prepare_token_request(
Expand Down

0 comments on commit 4d565f4

Please sign in to comment.