Best practice for having multiple panels with single authentication
Hi there,
After reading some issues on GitHub I was wondering what the current way is to have multiple panels but single authentication entry and redirect to same login page.
I have 2 panels:
-
app
(/)
- admin
(/admin)
I want both panels to redirect to /login
when an unauthenticated user is accessing the panels. Access to the panels is defined in the User
model by checking if they have the right permission.
Thanks!3 Replies
I did this by removing the login() call from the panel provider and just using the auth guard to redirect to the default laravel auth when people try to access the panels.
It does make sense to me that in a multi panel setup the auth should belong to the app not a specific panel, but in my case I needed that for sso login anyway.
Hi @Hennell,
Thank you for your input!
@Hennell I came across this issue some time ago and opted to have the login on one specific panel (/portal for example) and redirected all auth to point to that. Would be interested to see the code you used to remove login() from all panels and just used auth, can you share?