79409398

Date: 2025-02-03 16:33:54
Score: 1.5
Natty:
Report link

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` })
Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: alexisintech