]> BookStack Code Mirror - bookstack/commitdiff
Added environment variable for google select account option.
authorJustin Stein <redacted>
Sat, 13 Oct 2018 21:50:58 +0000 (14:50 -0700)
committerJustin Stein <redacted>
Sat, 13 Oct 2018 21:50:58 +0000 (14:50 -0700)
.env.example
app/Auth/Access/SocialAuthService.php

index eda20ea261bb9147a17dd451877fc42b5896311f..6e015335efa711ccfd1adeb1134df655a516c30a 100644 (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
index 024a1e736d11ddb76f97a43f86105337811e20cd..092f5212c1e6d9ee8a9ea129b0dcc95378c888ff 100644 (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();