Replies: 5 comments 6 replies
|
Hi @manu-mu1! Yes, this is a known edge case during key rotation/migration (HS256 → ES256) in distributed setups. Here is what is happening and what you can check: Why this happens Service Role JWT vs. API Key: Legacy service-role tokens store the key ID (kid) in their header. When using the old service-role JWT with the newly migrated ES256 active configuration, some auth nodes validate against the new JWKS endpoint while others check local state, causing intermittent failures. Recommended Steps Migrate to the New Secret Key (sb_secret_...): As you noticed in your test (20/20 success rate), switching completely away from legacy JWT service-role strings to the new sb_secret_... format avoids relying on legacy kid lookups altogether. Support Ticket: Since you already opened SU-429921, support can easily manually flush the instance cache or check if a specific Auth node in your cluster is failing key synchronization. |
|
We are seeing the same issue on another hosted Supabase project. Support ticket: SU-430784. We exclusively use a newly generated sb_secret_... key. No legacy service_role JWT is used, and all requests are executed sequentially without concurrency. We have already:
We then performed two read-only Admin Auth tests:
Every failure returned the same error: bad_jwt: unrecognized JWT kid Generating a new secret key and restarting the project did not resolve the issue. Retries reduce the user-facing impact, but the raw failure rate remains close to 20%. Could Supabase please inspect the hosted GoTrue/Auth gateway nodes for stale or inconsistent JWKS metadata? |
|
Facing the same issue on another hosted Supabase project. Have always been using a sb_secret key before this ES256 migration , and all admin requests were working previously. We have tried: Generated and deployed a new secret key Hope Supabase can fix this issue or provide a working solution for this, thank you! |
|
Can you check again please? |
Uh oh!
There was an error while loading. Please reload this page.
Since a recent JWT signing-key migration on our project, Admin API calls (admin.createUser, getUserById, updateUserById, deleteUser, and occasionally read-only listUsers) intermittently fail with a JWT verification error. The same operation, performed again later as a fresh attempt with no code or credential change, frequently succeeds. We've already opened a support ticket (SU-429921) but wanted to check whether others have hit this, since Free-plan tickets have no guaranteed response time.
Signing-key context
Exact error (safe — no secrets)
What we've ruled out
Not a disabled/invalid API key — we independently tested both the new sb_secret_... key and the legacy service-role (JWT-form) key. In sequential read-only testing, the new sb_secret_... key completed 20/20 listUsers() calls successfully, while the legacy service-role key completed 19/20, with one call failing with the same bad_jwt error. Both key types also produced the identical error during separate end-to-end Admin provisioning cycles.
Not a concurrency/parallelism issue on our end — every reproduction was run fully sequentially (no concurrent requests, file-level parallelism explicitly disabled in our test runner via both configuration and CLI flag). The failure still occurs with zero concurrency.
Not deterministic per-call or per-context — the same test file/operation passes cleanly in isolation multiple times in a row, then fails on a completely different specific call when run again minutes later. Successful calls and identical failed calls are interspersed within the same short run.
Installed client versions
Question
Is this a known transitional side effect of the HS256→ES256 signing-key migration (e.g. JWKS propagation lag across Auth service nodes, or some code path still referencing the previous key)? Is there anything we should check or wait for on our end, beyond what our open support ticket (SU-429921) is already covering?
All reactions