Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dlebedef's avatar

Jetstream: redirect after login based on role

I've found many different answers on how to handle a redirection after a successful login based on user role, but what I'm looking for is the best and proper way to achieve this with Jetstream (Fortify).

For instance admin would be redirected to '/dashboard' and user would be redirected to '/home'.

0 likes
6 replies
dlebedef's avatar

Thanks, this is exactly what I was looking for!

savins's avatar

Thank you very much for your answer @snapey. It worked but I don't know how to access the user. Could you help me with:

// below is the existing response // replace this with your own code // the user can be located with Auth facade

I print values with dd and I see the email and password in request->request->parameters but I don't know how to use them or authenticate the user.

Any help is welcome.

savins's avatar

I solved it looking the solutions in other thread where you also participated!!! Thank you anyway :)

cthrne's avatar

@savins Hey can you give me the link of the thread? Thankyou in advance.

1 like

Please or to participate in this conversation.