You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Using @clerk/react version ^5.26.2 on a SPA React app with React Router 6.26.0
While signed-in, navigate to any page inside the app (i.e. /the/url/before/signing/out)
Hard refresh
Sign out (tried with signOut(), signOut({ redirectUrl: '' }), signOut({ redirectUrl: '/sign-in' }) and signOut({ redirectUrl: '/' })
You land on the sign-in page but have query param redirect_url=/the/url/before/signing/out (as well as sign_in_fallback_redirect_url, sign_up_force_redirect_url, etc.)
Weird thing is that this does not happen if I do not refresh.
Expected behavior:
Redirect to sign in page without any query params.
When signing in I do not expect to land on the page I was when I signed-out. Another user might sign in and land on a page which might give them an error/404/forbidden.
On the other hand I understand that as per documentation and would expect if I visit /users/123/details while signed out, to get the redirect url and be redirected to that after signing in.
Actual behavior:
Redirected to sign-in with query params set (esp. redirect_url=/the/url/before/signing/out)
Preliminary Checks
I have reviewed the documentation: https://clerk.com/docs
I have searched for existing issues: https://github.com/clerk/javascript/issues
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
https://github.com/clerk/clerk-react-quickstart
Publishable key
pk_test_cHJvdmVuLWdsaWRlci04Mi5jbGVyay5hY2NvdW50cy5kZXYk
Description
Steps to reproduce:
Using
@clerk/react
version^5.26.2
on a SPA React app with React Router 6.26.0/the/url/before/signing/out
)signOut()
,signOut({ redirectUrl: '' })
,signOut({ redirectUrl: '/sign-in' })
andsignOut({ redirectUrl: '/' })
redirect_url=/the/url/before/signing/out
(as well assign_in_fallback_redirect_url
,sign_up_force_redirect_url
, etc.)Weird thing is that this does not happen if I do not refresh.
Expected behavior:
Redirect to sign in page without any query params.
When signing in I do not expect to land on the page I was when I signed-out. Another user might sign in and land on a page which might give them an error/404/forbidden.
On the other hand I understand that as per documentation and would expect if I visit /users/123/details while signed out, to get the redirect url and be redirected to that after signing in.
Actual behavior:
Redirected to sign-in with query params set (esp. redirect_url=/the/url/before/signing/out)
This is also reproducible with https://github.com/clerk/clerk-react-quickstart
Environment
The text was updated successfully, but these errors were encountered: