I have a custom login in my Filament app but the problem is I'm having trouble in preventing users from going back to my custom login. I implemented a prevent-back-history middleware in my custom login but it's not working.
I also added my custom middleware in
->middleware([
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class,
PreventBackHistory::class,
])
->authMiddleware([
Authenticate::class,
]);
but whenever I pressed the back button, I always go back to my custom login.
How to add a custom middleware in Filament to prevent users from going back to my custom login page?