We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This example is so buggy...
I don't know if someone notice but toasts with errors will never show on login page because of permanent redirection in middleware, for example:
localhost:3000/login?error=something will be redirected to localhost:3000/login
Errors from login are displayed based on error in url searchParams. So you have to change some code in middleware.ts file:
const pathWithoutQuery = path.split("?")[0]; if (!session && pathWithoutQuery !== "/login") { return NextResponse.redirect(new URL(`/login`, req.url)); } else if (session && pathWithoutQuery == "/login") { return NextResponse.redirect(new URL("/", req.url)); } return NextResponse.rewrite( new URL(`/app${path === "/" ? "" : path}`, req.url) );
The text was updated successfully, but these errors were encountered:
I changed it to look like this. So we have to manually go to url /
Sorry, something went wrong.
No branches or pull requests
This example is so buggy...
I don't know if someone notice but toasts with errors will never show on login page because of permanent redirection in middleware, for example:
localhost:3000/login?error=something will be redirected to localhost:3000/login
Errors from login are displayed based on error in url searchParams. So you have to change some code in middleware.ts file:
The text was updated successfully, but these errors were encountered: