Skip to content

Commit

Permalink
No need to use getConfig() for client_id and client_secret (#1276)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmichot authored Oct 24, 2024
1 parent 3c70406 commit 9ee6b05
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ protected function getTokenUrl(): string
protected function getCodeFields($state = null)
{
$fields = [
'client_id' => $this->getConfig('client_id') ?? $this->clientId,
'redirect_uri' => $this->getConfig('redirect') ?? $this->redirectUrl,
'client_id' => $this->clientId,
'redirect_uri' => $this->redirectUrl,
'scope' => $this->formatScopes($this->getScopes(), $this->scopeSeparator),
'response_type' => 'code',
];
Expand All @@ -67,7 +67,7 @@ protected function getTokenFields($code)
$fields = [
'grant_type' => 'authorization_code',
'code' => $code,
'redirect_uri' => $this->getConfig('redirect') ?? $this->redirectUrl,
'redirect_uri' => $this->redirectUrl,
];

if ($this->usesPKCE()) {
Expand All @@ -82,7 +82,7 @@ protected function getTokenFields($code)
*/
protected function getTokenHeaders($code): array
{
$base64 = base64_encode(($this->getConfig('client_id') ?? $this->clientId).':'.($this->getConfig('client_secret') ?? $this->clientSecret));
$base64 = base64_encode("{$this->clientId}:{$this->clientSecret}");

return [
'Content-Type' => 'application/x-www-form-urlencoded',
Expand Down

0 comments on commit 9ee6b05

Please sign in to comment.