Single login page for multiple panels
Hi guys, has anyone got any idea how to achieve a single login page under /login to access multiple panels?
I know I could do something like here (https://discord.com/channels/883083792112300104/1154830375655325907) but that just makes each login page to use the same class, but I still get a different Route/URL for every panel, such as
/admin/login
, /user/login
, /system/login
etc.
Has anyone got any idea how to override this so I have a single route /login
for every panel?3 Replies
I think you should be able to use simple custom page
I know, I checked the documentation and didn't find what I was looking for.
Thanks, I created and tried setting each login page for every panel to that page, which worked but resulted in different routes for each panel (such as /admin/login and /user/login), despite using the same class (so at least this solved the code duplication).
Turns out the best way so far was to disable all authorization pages (login, registration, etc) in every other panel except the default one and instead override them using closures,
so for example in the
AdminPanelProvider
and any other panel provider I would do:
...->login(fn() => redirect()->route('filament.core.auth.login'))
Thanks a lot guys π