supabase
supabase copied to clipboard
500 error when navigation directly to protected page
Using latest versions. When navigation directly to a protected page configured in redirect options will show a 500 error. When going to the route with a nuxtlink is working correct. Only when i type in the page for example incognito window will cause the issue.
my config supabase: { redirect: true, redirectOptions: { login: "/account/inloggen", callback: "/dashboard", include: ["/dashboard", "/dashboard/**"], exclude: [], },
So to reproduce. Set a protected page. I go there directly incognito this wont redirect you to login page but gives a 500 error.
I think this was the issue callback: "/dashboard", . So i fixed it. I use the pcke flow so what is the point of the callback function? I now just exchange a token for the session? I am never getting redirected to the callback page? after login i just redirect to dashboard.