多个登录bps的客户绑定同一个谷歌广告账号的判断
This commit is contained in:
parent
c8e69a1d26
commit
8cac0252b0
@ -44,8 +44,12 @@ class OAuthController
|
||||
$googleOAuthService = new GoogleOAuthService();
|
||||
|
||||
$tokens = $googleOAuthService->getRefreshToken($code);
|
||||
|
||||
if (!isset($tokens['refresh_token'])) {
|
||||
return $this->errorResponse(300, 'Invalid state parameter');
|
||||
if (isset($tokens['access_token'])) {
|
||||
return $this->errorResponse(300, 'Google Ads Account is Authorized');
|
||||
}
|
||||
return $this->errorResponse(300, 'Refresh Token getting failed');
|
||||
} else {
|
||||
$googleOAuthService->saveRefreshToken($tokens['refresh_token'], $state);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user