Skip to content

Conversation

@olamilekan000
Copy link

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

The JWKS endpoint (/auth/v1/.well-known/jwks.json) returns an empty keys array ({"keys": []}) for local Supabase instances because signing keys are not automatically generated during supabase init. Users must manually generate signing keys using supabase gen signingkeys and configure signing_keys_path in config.toml.
Issue: #4614

What is the new behavior?

  • Automatically generates a default RS256 signing key during supabase init
  • Saves the key to supabase/signing_keys.json (already in .gitignore)
  • Skips generation if the signing key file already exists
  • The JWKS endpoint now returns the public key, matching cloud behavior

Additional context

Add any other context or screenshots.
Screenshot 2025-12-23 at 23 02 57

@olamilekan000 olamilekan000 requested a review from a team as a code owner December 23, 2025 22:04
@olamilekan000
Copy link
Author

@sweatybridge kindly review. Thanks

@olamilekan000 olamilekan000 force-pushed the fix-jwk-endpoint-returning-empty-keys branch from 452699f to 6e88d0e Compare December 24, 2025 21:01
@olamilekan000 olamilekan000 force-pushed the fix-jwk-endpoint-returning-empty-keys branch from 6e88d0e to 159381e Compare December 24, 2025 21:20
@coveralls
Copy link

Pull Request Test Coverage Report for Build 20494065924

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 28 of 34 (82.35%) changed or added relevant lines in 1 file are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.04%) to 56.133%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/init/init.go 28 34 82.35%
Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 20484757308: 0.04%
Covered Lines: 6864
Relevant Lines: 12228

💛 - Coveralls

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants