Check auth status in NextJS Server Action?
I need to check the users auth status in a NextJS Server Action. If the user is authenticated I make an expensive API call to a non-Supabase service so I cant use the normal RLS stuff.
I've moved over to using the SSR package. This is what I have on the client:
And in my server action:
I assumed that there would be some property on the supabase object that tells me if the user is logged in, is that correct? It's a huge object so Im not sure which property to use.
I figured it would be something like this:
I've moved over to using the SSR package. This is what I have on the client:
And in my server action:
I assumed that there would be some property on the supabase object that tells me if the user is logged in, is that correct? It's a huge object so Im not sure which property to use.
I figured it would be something like this: