Hello,
I've created an Edge Function to handle storage uploads, but it will not accept my users auth key. I have made a simple RLS policy on the buckets which checks if the user is authenticated.
When I query the storage directly I supply the Bearer with the users 'access-token' and the Anon key as API key and it lets me upload a file.
But when doing it through the Edge Function with the exact same auth key as the bearer, it gives me the "Invalid API key" error. When passing the the anon/service key with Bearer, it works.
Am I missing something or do I need to pass the ANON key when creating the client?