Client-side data fetching supabaseauth-helpers-nextjs only gets data after navigating internally

I've implemented a client-side request inside useEffect() per the documentation (https://github.com/supabase/auth-helpers/blob/main/packages/nextjs/README.md#client-side-data-fetching-with-rls), and it works great when navigating inside the app, but if I load the page directly, it fails to return any data. There's no error though, it just returns an empty array. I've checked that the user object is present, but somehow, it still always returns an empty set instead of the expected set of objects.

Page code: https://gist.github.com/8d250b94057981f7f17cc0dc73abc274

Versions:
{
  "dependencies": {
    "@supabase/auth-helpers-nextjs": "^0.2.8",
    "@supabase/auth-helpers-react": "^0.2.4",
    "@supabase/supabase-js": "^1.35.7",
    "@supabase/ui": "^0.36.5",
    "next": "12.3.1",
    "pocketbase": "^0.7.1",
    "react": "17.0.2",
    "react-dom": "17.0.2"
  },
}
Gist
Data only loads after internal navigation. GitHub Gist: instantly share code, notes, and snippets.
GitHub
A collection of framework specific Auth utilities for working with Supabase. - auth-helpers/README.md at main · supabase/auth-helpers
Was this page helpful?