You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using "Test" Edge function button uses legacy auth token after JWT migration #37848
I migrated my project completely to the new JWT keys and disabled legacy keys. This works fine if I use the Supabase js SDK to call edge functions or my own curl call that sets the authorization header to a valid access token. However, if I use the "Test" button on the supabase dashboard edge function details page, it still uses a legacy auth token that I can't verify manually with the jose library and it fails.
I am relying on the "test" button on the dashboard to trigger them when needed and this blocks our migration from our test project to the production project
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Create an edge function with no jwt verification. Use sample code for jose JWT verification from supabase docs. Log the auth header for verification
Call this function from FE with a authenticated user or make a an authenticated curl call with a valid new JWT access token in the header. It will work
Try to call the function from the supabase Dashboard "Test" button, noticed it fails the verification.
Check the logs from edge function and the auth header will still use HS256 alg instead of the new one
Expected behavior
Expected that "Test" api call will create a valid token in new format.
Screenshots
System information
OS: macOS lates
Browser chrome
Additional context
I tried adding an authorization header as param to the "test" button form, but doesn't work
Activity