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
If you click log out right after logging in it will not work.
When checking the network in devtools, the call being made is to the login api
If we log inside auth.config.ts we can see that the redirect pathname is still /login until the page is refreshed, or user sends a message (which will cause a re-render). Then the logout will work fine and pathname will be /
Commenting out this code seems to fix it, but I don't have the time to verify.
// if (isLoggedIn) {
// if (isOnLoginPage || isOnSignupPage) {
// return Response.redirect(new URL('/', nextUrl))
// }
// }
I will try find the time to fix it properly, but if anyone gets to it first, even better. Should be a quick fix.
The text was updated successfully, but these errors were encountered:
The root cause is Response.redirect(new URL('/', nextUrl)) is a 302 redirection, makes Post method not working correctly.
Traditionally a 302 was used for a temporary redirect, and a 301 for a permanent redirect, but many browsers changed the request method of the redirect to GET, regardless of the original method.
If you click log out right after logging in it will not work.
When checking the network in devtools, the call being made is to the login api
If we log inside
auth.config.ts
we can see that the redirect pathname is still/login
until the page is refreshed, or user sends a message (which will cause a re-render). Then the logout will work fine and pathname will be/
Commenting out this code seems to fix it, but I don't have the time to verify.
I will try find the time to fix it properly, but if anyone gets to it first, even better. Should be a quick fix.
The text was updated successfully, but these errors were encountered: