Skip to content

Commit

Permalink
check if came from filament first
Browse files Browse the repository at this point in the history
  • Loading branch information
joelbutcher committed Sep 11, 2024
1 parent 7c8f020 commit cee500c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Http/Responses/OAuthLoginResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Responses/OAuthRegisterResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit cee500c

Please sign in to comment.