supabase icon indicating copy to clipboard operation
supabase copied to clipboard

500 error when navigation directly to protected page

Open jlemonz opened this issue 8 months ago • 1 comments

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.

jlemonz avatar Mar 14 '25 13:03 jlemonz

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.

jlemonz avatar Mar 14 '25 14:03 jlemonz