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
setSession can return an error but also throw an error. this is a bad practice (I already report to Supabase team) but it is the case.
This mean that checking return error is not enough and the example should be rewrite like this maybe :
You can produce the infinite loop by editing your cookie with invalid data on sb-access-token for example.
it will create a server error by the way because of the unhandled throw but you have the point.
The text was updated successfully, but these errors were encountered:
Have you tested your solution to see if it works? If that's working code that is preferable to avoid the infinite loop redirection, we'd be happy to receive a PR to the docs page to update the content!
We are quite busy getting our docs together for our launch of 5.0 beta next week, so I'm not sure how quickly someone would be able to get around to reviewing it. Maybe @kevinzunigacuellar who worked on a lot of our third-party guides originally and has experience with Supabase would be able to help verify and guide you through a PR to update the docs!
Those two redirect can lead to an infinite loop redirection
Signin should only redirect on dashboard if the JWT is valid not only because not !
docs/src/content/docs/en/guides/backend/supabase.mdx
Line 285 in af56f40
Dashboard should only redirect on signin if no error validating the tokens
docs/src/content/docs/en/guides/backend/supabase.mdx
Line 331 in af56f40
setSession can return an error but also throw an error. this is a bad practice (I already report to Supabase team) but it is the case.
This mean that checking return error is not enough and the example should be rewrite like this maybe :
You can produce the infinite loop by editing your cookie with invalid data on sb-access-token for example.
it will create a server error by the way because of the unhandled throw but you have the point.
The text was updated successfully, but these errors were encountered: