Getting user data on dynamic page with Next JS
I'm trying to make a dynamic page with NextJS using data stored in Supabase. This requires me to use
Any advice on how to proceed here? I'm planning to look more into
getStaticPaths to specify which pages are valid and getStaticProps to load one row's data for the page. I'm having trouble getting my user data in the getStaticPaths method, so that I can get items that are specific to that user. I'm also using row level security in my tables, so that a user can only select their data.Any advice on how to proceed here? I'm planning to look more into
@supabase/supabase-auth-helpers/nextjs and maybe make an API route that I can use to get my current user's ID, and then I can use that with a service-level Supabase client.