Using Custom Login Route for all Panels
I'm working on a Filament app and would like to use mutiple panels. After creating my panels, I discovered that each panel has it's own login page. I'm wondering if it's possible to have the same login page for all panels. For example, instead of
admin\login
app\login
customer\login
I want one login for all domain.com\login
Does anyone has an idea on how to go about this?11 Replies
you can allow one login for defualt panel only,
then use panel swithcer by bezhan to switch between panels
assuming that all panels uses same guard
Thanks for your input. However, how do you manage automatically redirecting users to their panel (dashboard) based on their usertype?
use custom login page then
and then restrtict access to other panels by using
canAccessPanel
all that is just suggestion, i didn't test them, just according to docs and some ideas,
so if it works tell me ^^I have tried the custom login page by first defining a login route
Route::get('/login', \App\Filament\Pages\Auth\Login::class)->name('login')
I extended the default Auth page
Without adding any logic to it yet, and just trying things out, I'm getting this error
Unable to find component: [app.filament.pages.auth.login]
This happens whenever, I submit the login formThat happens because app.filament.pages.auth.login view doesn't exist.
i meant to override the login in panel provider
->login(CLASS)
@stanwarriOh yes, I did that already with my new custom class. I forgot to mention that
So I was assume that shouldn't be an error since I was only extending the default Auth class
You are but that view isn't exisitng in the calling place.
But the original class already has it's view page defined
protected static string $view = 'filament-panels::pages.auth.login';
and it's showing the login page for me. This error only happens when I try to submit the login
What would you have done differently?@stanwarri did you find any solution?
No, I haven't been able to find a solution to this. What have you tried?