X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/756b55bbffedb6e5fde91f9fbc61f5a382f20705..refs/pull/3247/head:/app/Auth/Access/SocialAuthService.php diff --git a/app/Auth/Access/SocialAuthService.php b/app/Auth/Access/SocialAuthService.php index d165e76b1..0df5ceb5e 100644 --- a/app/Auth/Access/SocialAuthService.php +++ b/app/Auth/Access/SocialAuthService.php @@ -12,6 +12,7 @@ use Illuminate\Support\Str; use Laravel\Socialite\Contracts\Factory as Socialite; use Laravel\Socialite\Contracts\Provider; use Laravel\Socialite\Contracts\User as SocialUser; +use Laravel\Socialite\Two\GoogleProvider; use SocialiteProviders\Manager\SocialiteWasCalled; use Symfony\Component\HttpFoundation\RedirectResponse; @@ -278,12 +279,9 @@ class SocialAuthService { $driver = $this->socialite->driver($driverName); - if ($driverName === 'google' && config('services.google.select_account')) { + if ($driver instanceof GoogleProvider && config('services.google.select_account')) { $driver->with(['prompt' => 'select_account']); } - if ($driverName === 'azure') { - $driver->with(['resource' => 'https://graph.windows.net']); - } if (isset($this->configureForRedirectCallbacks[$driverName])) { $this->configureForRedirectCallbacks[$driverName]($driver);