Skip to content

Commit

Permalink
Fix redirecting
Browse files Browse the repository at this point in the history
  • Loading branch information
Baspa committed Sep 9, 2024
1 parent ffa4aa8 commit 3552dd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Http/Middleware/Force2Factor.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public function handle(Request $request, Closure $next): mixed
}

if (! $user->two_factor_confirmed_at) {

Check failure on line 18 in src/Http/Middleware/Force2Factor.php

View workflow job for this annotation

GitHub Actions / phpstan

Cannot access property $two_factor_confirmed_at on Illuminate\Foundation\Auth\User|null.
// TODO: Redirect to the two-factor page.
return redirect()->to(route('filament.' . filament()->getCurrentPanel()->getId() . '.pages.two-factor'));

Check failure on line 19 in src/Http/Middleware/Force2Factor.php

View workflow job for this annotation

GitHub Actions / phpstan

Call to an undefined method Filament\Contracts\Plugin|Filament\FilamentManager::getCurrentPanel().

Check failure on line 19 in src/Http/Middleware/Force2Factor.php

View workflow job for this annotation

GitHub Actions / phpstan

Cannot call method getId() on Filament\Panel|null.
}

return $next($request);
}
}
}

0 comments on commit 3552dd2

Please sign in to comment.