supabase google auth wont get cookies
hey guys
GOT DELETED FROM THE REDDIT????
i just ran into this problem and cant fix it myself and refuse to use AI for this project so you are my last resort rn.
im building this app with supabase and i'm using the auth services to sign in users using google right, at first i wanted to do it from the server but i was doing it through a button so i couldnt set the onclick property in nextjs with the button as a server component.
then i decided to turn the button to a client component and use browserClient for supabase. but now when i call auth.getUser() from server components or routes it never gets the cookies and just returns
AuthSessionMissingError so i guess it's because the session only exists on the client's side. but once again i can't sign in the user from the server. i've tried setting the function inside an actions file but that wont work either.
if you want to check my code it's hosted
GOT DELETED FROM THE REDDIT????
i just ran into this problem and cant fix it myself and refuse to use AI for this project so you are my last resort rn.
im building this app with supabase and i'm using the auth services to sign in users using google right, at first i wanted to do it from the server but i was doing it through a button so i couldnt set the onclick property in nextjs with the button as a server component.
then i decided to turn the button to a client component and use browserClient for supabase. but now when i call auth.getUser() from server components or routes it never gets the cookies and just returns
AuthSessionMissingError so i guess it's because the session only exists on the client's side. but once again i can't sign in the user from the server. i've tried setting the function inside an actions file but that wont work either.
if you want to check my code it's hosted