Skip to content

Commit

Permalink
state support for google oauth2
Browse files Browse the repository at this point in the history
  • Loading branch information
edbizarro committed Oct 15, 2018
1 parent 994183b commit 90cbee6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/Bi/Connect/Google/GoogleOauth2.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
*/
class GoogleOauth2 extends Oauth2Connect
{
const SCOPE_ANALYTICS = 'https://www.googleapis.com/auth/analytics.readonly';
const SCOPE_ANALYTICS = 'https://www.googleapis.com/auth/analytics';
const SCOPE_ANALYTICS_READ_ONLY = 'https://www.googleapis.com/auth/analytics.readonly';
const SCOPE_BASE = 'https://www.google.com/base/feeds/';
const SCOPE_BUZZ = 'https://www.googleapis.com/auth/buzz';
const SCOPE_BOOK = 'https://www.google.com/books/feeds/';
Expand Down Expand Up @@ -40,6 +41,7 @@ class GoogleOauth2 extends Oauth2Connect

protected $googleScopes = [
'analytics' => self::SCOPE_ANALYTICS,
'analytics.readonly' => self::SCOPE_ANALYTICS_READ_ONLY,
'base' => self::SCOPE_BASE,
'buzz' => self::SCOPE_BUZZ,
'book' => self::SCOPE_BOOK,
Expand Down Expand Up @@ -157,6 +159,12 @@ public function forceApprove()
$this->googleClient->setApprovalPrompt(self::FORCE);
}

public function setState($state)
{
$this->googleClient->setState($state);
}


/**
* @param string|array $token
*
Expand Down

0 comments on commit 90cbee6

Please sign in to comment.