How to redirect with user id after logged in?

Hi,

I’m using Next.js app router and I’m able to redirect to /dashboard after successful login.

Now I want to change my route to /dashboard/[userId]. How can I redirect to this route path together with the user id?