- session()->flash('success', trans('settings.users_social_disconnected', ['socialAccount' => title_case($socialDriver)]));
- return redirect(user()->getEditUrl());
+ }
+
+ /**
+ * Provide redirect options per service for the Laravel Socialite driver
+ */
+ public function getSocialDriver(string $driverName): Provider
+ {
+ $driver = $this->socialite->driver($driverName);
+
+ if ($driverName === 'google' && config('services.google.select_account')) {
+ $driver->with(['prompt' => 'select_account']);
+ }
+ if ($driverName === 'azure') {
+ $driver->with(['resource' => 'https://graph.windows.net']);
+ }
+
+ return $driver;