Clerk employee here!
When you call mountSignIn()
to mount the <SignIn />
component, you can pass an optional props
parameter: https://clerk.com/docs/components/authentication/sign-in#mount-sign-in
One of those props is forceRedirectUrl
: https://clerk.com/docs/components/authentication/sign-in#properties:~:text=Name-,forceRedirectUrl,-%3F
Once you've configured this, when a user uses the <SignIn />
component to sign in, they will be redirected to whatever URL you passed to forceRedirectUrl
.
Example:
mountSignIn({ forceRedirectUrl: `/dashboard` })