Preliminary Checks
Reproduction / Replay Link
https://gitlab.com/jeremysawesome/clerk-minimal-reproduction
Publishable key
pk_test_dG9nZXRoZXItZWdyZXQtMzUuY2xlcmsuYWNjb3VudHMuZGV2JA
Description
If the Home URL and the current url are the same, and there is a SignIn or SignUp component mounted on the page, then Clerk will infinitely redirect.
Here's a gif to illustrate

Steps to reproduce:
- Drop the index.html file into a directory where it can be accessed via browser
(i.e. $DEVHOST/clerk-minimal-reproduction/).
- Adjust the script src and publishable key for your Clerk app.
- Navigate to Developers > Paths in your Clerk Dashboard
- Change your Application homepage to
/clerk-minimal-reproduction/
- Do the same for all the User redirects in Configure > Account Portal > Redirects
- Log in or sign up for your application via
$DEVHOST/clerk-minimal-reproduction/ in your browser.
Behold the redirect loop.
Expected behavior:
- Don't redirect to the same url (in the case where the Home URL and current URL are the same)
- Output a warning or error in the console if the preconditions fail.
- Don't render the components if the preconditions fail (i.e. the urls are the same).
Actual behavior:
Clerk initiates an infinite redirect loop. It's hard to find the reason why unless you are able to pause the page after the Clerk message appears in the console but before the page reloads.
Environment
Not necessary. This is a simple index.html page hosted at a publicly accessible url.
Preliminary Checks
Reproduction / Replay Link
https://gitlab.com/jeremysawesome/clerk-minimal-reproduction
Publishable key
pk_test_dG9nZXRoZXItZWdyZXQtMzUuY2xlcmsuYWNjb3VudHMuZGV2JA
Description
If the Home URL and the current url are the same, and there is a SignIn or SignUp component mounted on the page, then Clerk will infinitely redirect.
Here's a gif to illustrate
Steps to reproduce:
(i.e.
$DEVHOST/clerk-minimal-reproduction/)./clerk-minimal-reproduction/$DEVHOST/clerk-minimal-reproduction/in your browser.Behold the redirect loop.
Expected behavior:
Actual behavior:
Clerk initiates an infinite redirect loop. It's hard to find the reason why unless you are able to pause the page after the Clerk message appears in the console but before the page reloads.
Environment