Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve call to protected method OAuthController #49

Merged
merged 1 commit into from
Aug 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -41,7 +41,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 @@ -41,7 +41,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
Loading