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();