Skip to content

Commit

Permalink
Merge pull request #49 from datamweb/fix-call-to-protected-method-OAu…
Browse files Browse the repository at this point in the history
…thController

fix: resolve call to protected method OAuthController
  • Loading branch information
datamweb authored Aug 27, 2023
2 parents 42c4150 + fdd3e07 commit 9760007
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Libraries/Basic/AbstractOAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ abstract class AbstractOAuth
{
protected string $token;

abstract protected function makeGoLink(string $state): string;
abstract public function makeGoLink(string $state): string;

abstract protected function fetchAccessTokenWithAuthCode(array $allGet): void;

Expand Down
2 changes: 1 addition & 1 deletion src/Libraries/GithubOAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(string $token = '')
$this->client_secret = $this->config->oauthConfigs['github']['client_secret'];
}

protected function makeGoLink(string $state): string
public function makeGoLink(string $state): string
{
return $redirectUrl = self::$API_CODE_URL . "?client_id={$this->client_id}&redirect_uri={$this->callback_url}&scope=user%3Aemail&response_type=code&state={$state}";
}
Expand Down
2 changes: 1 addition & 1 deletion src/Libraries/GoogleOAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(string $token = '')
$this->client_secret = $this->config->oauthConfigs['google']['client_secret'];
}

protected function makeGoLink(string $state): string
public function makeGoLink(string $state): string
{
return self::$API_CODE_URL . "?response_type=code&client_id={$this->client_id}&scope=openid%20email%20profile&redirect_uri={$this->callback_url}&state={$state}";
}
Expand Down

0 comments on commit 9760007

Please sign in to comment.