Added environment variable for google select account option.

This commit is contained in:
Justin Stein 2018-10-13 14:50:58 -07:00
parent 79afec9737
commit 57d99130ee
2 changed files with 2 additions and 1 deletions

View file

@ -48,6 +48,7 @@ GITHUB_APP_ID=false
GITHUB_APP_SECRET=false
GOOGLE_APP_ID=false
GOOGLE_APP_SECRET=false
GOOGLE_SELECT_ACCOUNT=false
OKTA_BASE_URL=false
OKTA_APP_ID=false
OKTA_APP_SECRET=false

View file

@ -52,7 +52,7 @@ class SocialAuthService
public function startRegister($socialDriver)
{
$driver = $this->validateDriver($socialDriver);
if ($socialDriver == 'google') {
if ($socialDriver == 'google' && env('GOOGLE_SELECT_ACCOUNT')) {
return $this->socialite->driver($driver)->with(['prompt' => 'select_account'])->redirect();
}
return $this->socialite->driver($driver)->redirect();