Skip to content

Commit

Permalink
sources/oauth: fix authentication only being sent in form body
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu committed Jan 16, 2025
1 parent f354574 commit b84a30d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion authentik/sources/oauth/clients/oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ def get_access_token(self, **request_kwargs) -> dict[str, Any] | None:
if self.source.source_type.urls_customizable and self.source.access_token_url:
access_token_url = self.source.access_token_url
response = self.do_request(
"post", access_token_url, data=args, headers=self._default_headers, **request_kwargs
"post",
access_token_url,
auth=(self.get_client_id(), self.get_client_secret()),
data=args,
headers=self._default_headers,
**request_kwargs,
)
response.raise_for_status()
except RequestException as exc:
Expand Down

0 comments on commit b84a30d

Please sign in to comment.