From 57d99130ee6923b1bbbbe6ee299451d5fd68c70f Mon Sep 17 00:00:00 2001 From: Justin Stein Date: Sat, 13 Oct 2018 14:50:58 -0700 Subject: [PATCH] Added environment variable for google select account option. --- .env.example | 1 + app/Auth/Access/SocialAuthService.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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();