]> BookStack Code Mirror - bookstack/commitdiff
Add select account parameter for google authorization
authorJustin Stein <redacted>
Fri, 12 Oct 2018 18:52:13 +0000 (11:52 -0700)
committerJustin Stein <redacted>
Fri, 12 Oct 2018 18:52:13 +0000 (11:52 -0700)
Useful for choosing an account if a default account is outside the scope of a G Suite organization.

app/Auth/Access/SocialAuthService.php

index 87db1d5c6d4f1bfeadfb28c173da36e777b1b6a9..024a1e736d11ddb76f97a43f86105337811e20cd 100644 (file)
@@ -52,6 +52,9 @@ class SocialAuthService
     public function startRegister($socialDriver)
     {
         $driver = $this->validateDriver($socialDriver);
     public function startRegister($socialDriver)
     {
         $driver = $this->validateDriver($socialDriver);
+        if ($socialDriver == 'google') {
+            return $this->socialite->driver($driver)->with(['prompt' => 'select_account'])->redirect();
+        }
         return $this->socialite->driver($driver)->redirect();
     }
 
         return $this->socialite->driver($driver)->redirect();
     }