Skip to content

JWKS Endpoint Returns Empty Key Set for Local Supabase #4614

Closed

Description

@whollacsek

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

When following the guide to verify a jwt key https://supabase.com/docs/guides/auth/jwts#verifying-a-jwt-from-supabase on the local Supabase instance (https://127.0.0.1:8000/auth/v1/.well-known/jwks.json) the result is:

{
"keys": []
}

Running supabase status will display the publishable and secret keys.

This does work on the cloud Supabase instance, the issue is only affecting local dev.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Run supabase start
  2. Go to /auth/v1/.well-known/jwks.json
  3. See empty keys array

Expected behavior

Public key should be returned.

System information

  • Version of supabase cli: 2.63.1

Additional context

/auth/v1/.well-known/jwks.json works on hosted Supabase.

Activity

  1. added
    bug
    on Nov 30, 2025
  2. Adityakk9031 commented on Nov 30, 2025

    @Adityakk9031
    Contributor

    can i work on this issue

  3. singh-inder commented on Dec 1, 2025

    @singh-inder
    Contributor

    I'm guessing you haven't added signing key in config.toml.

    1. You will have to generate a new signing key using the command in this guide: https://supabase.com/docs/guides/auth/signing-keys#how-to-create-mint-jwts-if-access-to-the-private-key-or-shared-secret-is-not-possible
    2. Save the key in a file and add the path in config.toml (signing_keys_path field is already present in config.toml, you just need to uncomment it and update the signing key file path if necessary)
      [auth]
      signing_keys_path = "./signing_key.json"

    Restart and now you should get a public key when you visit https://127.0.0.1:8000/auth/v1/.well-known/jwks.json

  4. whollacsek commented on Dec 1, 2025

    @whollacsek
    Author
  5. harshtiwari2022 commented on Dec 1, 2025

    @harshtiwari2022

    @whollacsek Sir, I have made improvements and would like to continue working on this. Could you please assign the issue to me?

  6. aantti commented on Dec 12, 2025

    @aantti
  7. sweatybridge commented on Dec 12, 2025

    @sweatybridge
    Contributor

    Moving to cli repo. We can look into generating a signing key by default.

  8. joelpramos commented on Jan 4, 2026

    @joelpramos

    I'm guessing you haven't added signing key in config.toml.

    1. You will have to generate a new signing key using the command in this guide: https://supabase.com/docs/guides/auth/signing-keys#how-to-create-mint-jwts-if-access-to-the-private-key-or-shared-secret-is-not-possible
    2. Save the key in a file and add the path in config.toml (signing_keys_path field is already present in config.toml, you just need to uncomment it and update the signing key file path if necessary)
      [auth]
      signing_keys_path = "./signing_key.json"

    Restart and now you should get a public key when you visit https://127.0.0.1:8000/auth/v1/.well-known/jwks.json

    @singh-inder @kallebysantos if I check this in and I use the config as code to control my hosted Supabase, will this impact the configuration on my Supabase project?

    I am looking for a way to only set the 'custom' private key locally so I have the same behaviour locally but let the Supabase project manage the key for me.

  9. joelpramos commented on Jan 4, 2026

    @joelpramos

    minor thing on the above which I guess @sweatybridge will look into is that the cli produces 1 key (i.e. a JSON dictionary) but a key file (the signing_key.json) should be an array.

    below is the current message which is a bit misleading:

    { .... the produced key }
    
    To enable JWT signing keys in your local project:
    1. Save the generated key to supabase/signing_key.json
    2. Update your supabase/config.toml with the new keys path
    
    [auth]
    signing_keys_path = "./signing_key.json"
  10. joelpramos commented on Jan 5, 2026

    @joelpramos

    I'm guessing you haven't added signing key in config.toml.

    1. You will have to generate a new signing key using the command in this guide: https://supabase.com/docs/guides/auth/signing-keys#how-to-create-mint-jwts-if-access-to-the-private-key-or-shared-secret-is-not-possible
    2. Save the key in a file and add the path in config.toml (signing_keys_path field is already present in config.toml, you just need to uncomment it and update the signing key file path if necessary)
      [auth]
      signing_keys_path = "./signing_key.json"

    Restart and now you should get a public key when you visit https://127.0.0.1:8000/auth/v1/.well-known/jwks.json

    @singh-inder @kallebysantos if I check this in and I use the config as code to control my hosted Supabase, will this impact the configuration on my Supabase project?

    I am looking for a way to only set the 'custom' private key locally so I have the same behaviour locally but let the Supabase project manage the key for me.

    the answer is yes and I worked around with setting it to empty string using branches:

    [remotes.staging.auth]
    signing_keys_path = ""
    

    @sweatybridge think it would be a good idea to allow to create a local branch, or create 'reserved' keyword for the branch, so that one could set up local environment definitions. as it stands we have to set up for local by default and override per environment. let me know if you'd like me to create a ticket with that suggestion.

  11. whollacsek commented on Jan 6, 2026

    @whollacsek
    Author
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions