Uh oh!
There was an error while loading. Please reload this page.
fix JWK endpoints returning empty keys - #4662
Conversation
olamilekan000
commented
Dec 23, 2025
@sweatybridge kindly review. Thanks |
6e88d0e to
159381eComparecoveralls
commented
Dec 25, 2025
Pull Request Test Coverage Report for Build 20494065924Warning: 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
💛 - Coveralls |
159381e to
b8cad1cCompare| return errors.Errorf("failed to read signing keys: %w", err) | ||
| } else if c.Auth.SigningKeys, err = fetcher.ParseJSON[[]JWK](f); err != nil { | ||
| return errors.Errorf("failed to decode signing keys: %w", err) | ||
| if err := c.loadSigningKeys(fsys); err != nil { |
There was a problem hiding this comment.
this refactor is unnecessary because ParseJSON closes the reader automatically
| func Run(ctx context.Context, fsys afero.Fs, interactive bool, params utils.InitParams) error { | ||
| // 1. Write `config.toml`. | ||
| // 1. Generate default signing key if it doesn't exist. |
There was a problem hiding this comment.
Since supabase init is no longer a prerequisite for supabase start, we cannot assume users will always run init before start. Let's handle signing key generation as part of config loading instead.
olamilekan000
commented
Jan 7, 2026
@sweatybridge just to confirm, this PR isn't necessary anymore with the recent merge right? |
sweatybridge
commented
Jan 7, 2026
Yea it's no longer needed but thanks for picking up this issue anyway! |
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 configuresigning_keys_pathinconfig.toml.Issue: #4614
What is the new behavior?
Additional context
Add any other context or screenshots.
