How to use current Login
Hi,
Is it possible to to disable the filament admin login page and use an existing login ?
9 Replies
Yes, set null to the Login page in the filament config file and find a way to add the one you have.. by adding a route or however you want..
Hmm not sure that will work.... Or not completely....
I think I will need to extend
vendor/filament/filament/src/Http/Middleware/Authenticate.php
and overwrite the protected function redirectTo($request)
method.
Need to make sure to use my custom Middleware in the filament config under auth as well 🙂Umm I mean sure..
couldnt you just set up a redirect route with the same name as our old login page?
then you dont need to override middleware
^
You could just redirect to config( ‘filament.path’)
Nope because I guess the filament routes are being registered after the laravel routes so doing something like
doesn't work because it is overwritten.
Route::redirect('/admin/login', '/login')->name('filament.auth.login');
and also set login
to null
in config🤦♂️ Thanks Dan, that works 😄
Also improvement on Dan's code slightly:
Route::redirect('/'.config('filament.path').'/login', '/login')->name('filament.auth.login');
Incase you change the route of filament the redirect becomes partially dynamic/