Skip to content

ES256 JWT verification fails in Edge Functions after CLI upgrade to 2.72.6 #41929

Closed as duplicate

Description

@leepokai

Bug description

After upgrading Supabase CLI from version 2.67.1 to 2.72.6, Edge Functions fail with ES256 JWT verification error when running locally with
supabase start.

The error occurs when using the official https://supabase.com/docs/guides/functions/examples/push-notifications with FCM.

Workaround confirmed: Downgrading CLI to version 2.67.1 resolves the issue.

To Reproduce

  1. Upgrade Supabase CLI to version 2.72.6
  2. Run supabase start for local development
  3. Deploy/serve an Edge Function that uses JWT verification (e.g., the FCM push notification example)
  4. Call the Edge Function
  5. Observe the error

Expected behavior

Edge Functions should work correctly after CLI upgrade, maintaining backward compatibility with JWT verification.

Error logs

2026-01-14T17:16:42.303888480Z TypeError: Key for the ES256 algorithm must be of type CryptoKey. Received an instance of Uint8Array
2026-01-14T17:16:42.304290646Z at asymmetricTypeCheck (https://deno.land/x/[email protected]/lib/check_key_type.ts:14:11)
2026-01-14T17:16:42.304299271Z at checkKeyType (https://deno.land/x/[email protected]/lib/check_key_type.ts:39:5)
2026-01-14T17:16:42.304300771Z at flattenedVerify (https://deno.land/x/[email protected]/jws/flattened/verify.ts:78:3)
2026-01-14T17:16:42.304301896Z at compactVerify (https://deno.land/x/[email protected]/jws/compact/verify.ts:15:26)
2026-01-14T17:16:42.304302896Z at Module.jwtVerify (https://deno.land/x/[email protected]/jwt/verify.ts:5:26)
2026-01-14T17:16:42.304303896Z at verifyJWT (file:///var/tmp/sb-compile-edge-runtime/root/index.ts:95:16)
2026-01-14T17:16:42.304304854Z at Object.handler (file:///var/tmp/sb-compile-edge-runtime/root/index.ts:140:34)
2026-01-14T17:16:42.304305979Z at mapped (ext:runtime/http.js:231:42)
2026-01-14T17:16:42.304306938Z at respond (ext:runtime/http.js:339:14)
2026-01-14T17:16:42.304307854Z at handleHttp (ext:runtime/http.js:160:9)

Environment

  • Supabase CLI version (broken): 2.72.6
  • Supabase CLI version (working): 2.67.1
  • Environment: Local development (supabase start)
  • OS: Linux (linuxbrew installation)

Additional context

This appears to be related to the jose library's requirement for CryptoKey type instead of Uint8Array for ES256 algorithm. The regression
suggests a change in how JWT keys are handled between CLI versions 2.67.1 and 2.72.6.

Related issues:

Activity

  1. added
    bug
    on Jan 15, 2026
  2. added
    external-issue
    on Jan 15, 2026
  3. coderabbitai commented on Jan 15, 2026

    @coderabbitai
    Contributor

    📝 CodeRabbit Plan Mode

    Generate an implementation plan and prompts that you can use with your favorite coding agent.

    • Create Plan
    Examples

    🔗 Related PRs

    #41444 - feat(docs): edge functions JWT Signing Keys guide [merged]
    #41727 - docs: improvements on securing Edge Functions guide [merged]


    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  4. added
    cli
    and removed on Jan 15, 2026
  5. kallebysantos commented on Jan 15, 2026

    @kallebysantos
    Member

    Hey @leepokai 💚

    I'll be closing it as duplicated, reference to my previous answer supabase/edge-runtime#654 (comment)

    Since API keys and JWT did change, you need to explicit verify_jwt = false for edge functions,
    like described in docs page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugcliedge functionsexternal-issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions