auth-helpers icon indicating copy to clipboard operation
auth-helpers copied to clipboard

Client Side DB queries don't work when refreshing the page

Open stukennedy opened this issue 3 years ago • 0 comments

Bug report

I'm following the Magic Link sveltekit example code and got it working (there's actually a deprecated skHelper in there, but other than that it works) I can login and it redirects to my protected "projects page" and loads my data from the authenticated Supabase DB API call (in the Svelte client-side script as shown in your sveltekit documentation). However if you refresh the page, even though the $session.user is there it calls the API and it returns a 200, but with nothing in the response. If I navigate to the home page and navigate back using the apps routing, it all works great. Very confused. The page I'm loading has no endpoint that is intercepting it, so I'm not quite sure what I'm missing here.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: MacOS
  • Browser: Firefox
  • Version of supabase-js: "@supabase/auth-helpers-svelte": "^0.4.5", "@supabase/supabase-js": "^1.35.4",
  • Version of Node.js: 16.14.0

stukennedy avatar Aug 13 '22 23:08 stukennedy