diff --git a/src/Http/Responses/OAuthLoginResponse.php b/src/Http/Responses/OAuthLoginResponse.php index 1bf2e7c..f761d24 100644 --- a/src/Http/Responses/OAuthLoginResponse.php +++ b/src/Http/Responses/OAuthLoginResponse.php @@ -20,7 +20,7 @@ class OAuthLoginResponse implements LoginResponseContract public function toResponse($request): RedirectResponse|FortifyLoginResponse { return match (true) { - $this->usesFilament() && $this->hasFilamentAuthRoutes() => redirect()->route( + $this->cameFromFilamentAuthRoute() && $this->usesFilament() && $this->hasFilamentAuthRoutes() => redirect()->route( config('socialstream.filament-route', 'filament.admin.pages.dashboard') ), $this->hasComposerPackage('laravel/jetstream') => $this->fortifyResponse($request), diff --git a/src/Http/Responses/OAuthRegisterResponse.php b/src/Http/Responses/OAuthRegisterResponse.php index 61a83dd..61a4878 100644 --- a/src/Http/Responses/OAuthRegisterResponse.php +++ b/src/Http/Responses/OAuthRegisterResponse.php @@ -21,7 +21,7 @@ class OAuthRegisterResponse implements RegisterResponseContract public function toResponse($request): RedirectResponse|RegisterResponse { return match (true) { - $this->usesFilament() && $this->hasFilamentAuthRoutes() => redirect()->route( + $this->cameFromFilamentAuthRoute() && $this->usesFilament() && $this->hasFilamentAuthRoutes() => redirect()->route( config('socialstream.filament-route', 'filament.admin.pages.dashboard') ), $this->hasComposerPackage('laravel/jetstream') => $this->fortifyResponse($request),