Edge function giving 401 response after migrating to JWT Signing Keys
I tried running this simple edge function, but I am getting 401 error
edge function:
6 Replies
You have to turn off JWT verification with the new keys.
https://supabase.com/docs/guides/api/api-keys#known-limitations-and-compatibility-differences
thanks, so the edge function now works. another question, since i disabled verify jwt with legacy secret, does that mean supabase will be verifying using jwt signing keys or does it mean supabase isnt verifying the key at all?


You will need to verify the authorization header if you do not just pass it on to supabase-js call.
so if i am using supabase auth i could just leave the edge function call code as it is and supabase would handle all the security like it used to with the old jwt flow?
for example, theres nothing i need to modify here, supabase will authenticate?
Because of this backward compatibility it would pass your SB token on to the REST server which knows to convert it to anon or service role jwt.

This thread might have more from users dealing with it https://github.com/orgs/supabase/discussions/29260
I'm not really up to speed on it.