From: Justin Stein Date: Sat, 13 Oct 2018 21:50:58 +0000 (-0700) Subject: Added environment variable for google select account option. X-Git-Tag: v0.24.2~3^2~2^2~6 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/57d99130ee6923b1bbbbe6ee299451d5fd68c70f Added environment variable for google select account option. --- diff --git a/.env.example b/.env.example index eda20ea26..6e015335e 100644 --- a/.env.example +++ b/.env.example @@ -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 diff --git a/app/Auth/Access/SocialAuthService.php b/app/Auth/Access/SocialAuthService.php index 024a1e736..092f5212c 100644 --- a/app/Auth/Access/SocialAuthService.php +++ b/app/Auth/Access/SocialAuthService.php @@ -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();