using /{authSlug} instead of /{path}/{authSlug}
I have a site that basically has a front end that lets users access and interact with limited details after they have logged into the site.
I then use filamentphp for the backend because it makes building a backend super quick and easy.
the problem I have is this, when the user logins they have to go to
/{path}/login instead of just doing something like /login
I setup the middleware for logging in so only specific users with specific roles or permissions get sent to /admin and all other users get sent to the front end.
I just think its super announing I can't have users go to /login? There has to be a way to do this without building the entire login system, right?
I would much rather have a bunch of endpoints like /login /register, or /password-reset then then /admin/login.1 Reply
Was really hoping that https://filamentphp.com/docs/3.x/panels/users#customizing-the-authentication-route-slugs
But this still uses
/{path} as the bsae.
Alright, this is kind of super dumb, but what I ended up going with is the following:
1. Create a new Panel called Auth
2. Use the url /auth/{slug} as this will seem less admin like for normal users
3. Create a middleware (already had one) that checks if the user is an admin or not, if they are an admin, they get sent to /admin if they are not they get sent to / which is the front end.
This feels so hacky. I really love filament, because it makes building backends so quick and easy. But if you don't want to use filament for your front end, man it becomes kinda of hacky solutions.