From a76599bd2aaf85040b67b3ce2f64e6ea88961936 Mon Sep 17 00:00:00 2001 From: Justin Stein Date: Fri, 12 Oct 2018 11:52:13 -0700 Subject: [PATCH] Add select account parameter for google authorization Useful for choosing an account if a default account is outside the scope of a G Suite organization. --- app/Auth/Access/SocialAuthService.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Auth/Access/SocialAuthService.php b/app/Auth/Access/SocialAuthService.php index 87db1d5c6..024a1e736 100644 --- a/app/Auth/Access/SocialAuthService.php +++ b/app/Auth/Access/SocialAuthService.php @@ -52,6 +52,9 @@ class SocialAuthService 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(); }