-
Notifications
You must be signed in to change notification settings - Fork 282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
404 (not-found.tsx) triggered when logging out #3864
Comments
same issue |
Extending the export default clerkMiddleware(
(auth, request) => {
if (!auth().userId && !isPublicRoute(request)) {
return auth().redirectToSignIn();
}
// other config here...
} |
I'm hitting something similar that I think is related to this same issue. From what I can tell, when the sign out occurs you get a In our case this is presenting as a |
We are seeing this as well. |
This should be fixed by #4001 and was released in https://github.com/clerk/javascript/blob/refs/heads/main/packages/clerk-js/CHANGELOG.md#5170. Please remove any workaround you might have added and give it a try, you should automatically get the new version (In the network graph the request for |
I'm seeing this again with |
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/tpiros/clerk-sample.git
Publishable key
pk_test_Y29oZXJlbnQtcG9ueS02OC5jbGVyay5hY2NvdW50cy5kZXYk
Description
In a Next.js project, when on a protected path, after signing out, if
not-found.tsx
is added at the root level of the project, the 404 page shows up for a moment before the user gets redirected to the the path specified via<ClerkProvider>
'safterSignOutUrl
prop.To test, throttle the network down to Fast 3G at least to see the 404 page show up. Steps to reproduce: Sign in, Navigate to /protected, Sign out.
Environment
The text was updated successfully, but these errors were encountered: