Skip to content

Using "Test" Edge function button uses legacy auth token after JWT migration #37848

Open

Description

@Thorsten-Kd

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

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:

  1. Create an edge function with no jwt verification. Use sample code for jose JWT verification from supabase docs. Log the auth header for verification
  2. 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
  3. Try to call the function from the supabase Dashboard "Test" button, noticed it fails the verification.
  4. 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

  1. added
    bug
    on Aug 11, 2025
  2. added
    external-issue
    on Aug 11, 2025
  3. added
    auth
    and removed on Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    authbugedge functionsexternal-issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions