Error updating user: { message: "Invalid API key", hint: "Double check your Supabase `anon` or `serv
Hi!
I am trying to update my user using user's auth token
It is working in local but when I deploy the edge function it is throwing 500 Error with message { message: "Invalid API key", hint: "Double check your Supabase
anon
anon
or
service_role
service_role
API key." }
// Function to create a Supabase client with the auth token - Private export const createAuthClient = (req: Request) => { const authToken = req.headers.get("Authorization")?.split(" ")[1]; const supabaseUrl = Deno.env.get("SUPABASE_URL") ?? ""; return createClient(supabaseUrl, authToken ?? ""); };
this is how I am using user's auth token in order to create a client
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.