serverSupabaseUser works on localhost but throws error on production
Hi Guys,
i have a strange behaviour. on my nuxt3 i have a server route /api/get-invoice-pdf.js
this is a function that either generates a pdf for download or generates a pdf on a storage.
when its for download i need a supabase user:
when not i need the users id with the POST request. Nevermind this is all not important.
important is that this function works triggered by a user or triggered as non logged in user perfectly.
when its on production it throws the error: "500 Auth session missing!"
this is the line that is the problem:
has anyone an idea?
is it because of CORS since on localhost everything works and when on live i request from localhost to my server url example.com/api/get-invoice-pdf
0 Replies