supabase.auth.setSession() not working in serverless function
In my SvelteKit app, I need to pass the user's access token & refresh token to an API endpoint, set up an auth session for the user, then fire off some authenticated requests to Supabase. It's not working, though. Details:
First, I fire off a request to an API endpoint like this, passing along the user's access token and refresh token:
The request handler function for that API endpoint looks like this:
When I run
First, I fire off a request to an API endpoint like this, passing along the user's access token and refresh token:
The request handler function for that API endpoint looks like this:
When I run
console.log(setSessionData), I get this: