]> BookStack Code Mirror - bookstack/commitdiff
Added Google select account functionality to login
authorJustin Stein <redacted>
Sat, 13 Oct 2018 22:14:06 +0000 (15:14 -0700)
committerJustin Stein <redacted>
Sat, 13 Oct 2018 22:14:06 +0000 (15:14 -0700)
app/Auth/Access/SocialAuthService.php

index 092f5212c1e6d9ee8a9ea129b0dcc95378c888ff..a9adec93eb5ddac37581f2a61c0e7dd279d956ce 100644 (file)
@@ -40,6 +40,9 @@ class SocialAuthService
     public function startLogIn($socialDriver)
     {
         $driver = $this->validateDriver($socialDriver);
+        if ($socialDriver == 'google' && env('GOOGLE_SELECT_ACCOUNT')) {
+            return $this->socialite->driver($driver)->with(['prompt' => 'select_account'])->redirect();
+        }
         return $this->socialite->driver($driver)->redirect();
     }