Why is my register page always redirecting to `/users`?
What I am trying to do:
Redirect users to my main dashboard page after registering.
What I did:
My issue/the error:
When logging in users get redirected to
/users
and I don't understand why. The UserResource
has the following restriction:
Logging the Filament::getUrl() in the default RegistrationResponse
returns https://myappname.uk/users
6 Replies
is
Register::class
a custom registration class?Hello Adam, thanks for replying. Yes it is. Just a couple of removed fields from the form component. No other mods .
I ended up binding a new RegistrationResponse, but still feels weird.
Yea. I was digging too. Only thing I could see is bail for a logged in user that redirects to intended, but I couldn’t find anything in the code redirecting to /users especially since it’s not a defined route by default in filament. Do you have another panel named ‘users’ by any chance?
Possibly something in RouteServiceProvider if it’s a legacy app.
Thanks for the insight adam. Only one panel. No route service provider either. It's a mystery.
What is the first item in your navigation?
getUrl() returns the first item in the navigation manager, that’s the only thing I can think of.
If users is your first item then overriding the response would be the correct way to make it work.
Thank you sir. That was what it must be.
That is an amazing ability - to diagnose problems with limited information and without context.
I reqlly appreciate your time Adam, thanks.