diff --git a/src/Http/Controllers/OAuthController.php b/src/Http/Controllers/OAuthController.php index bf1c58d0..79deb94f 100644 --- a/src/Http/Controllers/OAuthController.php +++ b/src/Http/Controllers/OAuthController.php @@ -14,6 +14,7 @@ use JoelButcher\Socialstream\Contracts\UpdatesConnectedAccounts; use JoelButcher\Socialstream\Features; use JoelButcher\Socialstream\Socialstream; +use Laravel\Fortify\Features as FortifyFeatures; use Laravel\Jetstream\Jetstream; use Laravel\Socialite\Facades\Socialite; use Laravel\Socialite\Two\InvalidStateException; @@ -134,7 +135,7 @@ public function handleProviderCallback(Request $request, string $provider, Resol } // Registration... - if (session()->get('socialstream.previous_url') === route('register')) { + if (FortifyFeatures::enabled(FortifyFeatures::registration()) && session()->get('socialstream.previous_url') === route('register')) { if ($account) { return redirect()->route('register')->withErrors( __('An account with that :Provider sign in already exists, please login.', ['provider' => $provider]), 'socialstream'