Draft
Conversation
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 12e42ef. Configure here.
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
Co-authored-by: Jakub Dobry <dobrac@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Motivation
Dashboard and API auth were tied to Supabase-specific HMAC JWT configuration (
SUPABASE_JWT_SECRETS) and Supabase-specific headers. That made it hard to support other auth providers that issue JWTs signed with JWKS, and it forced provider-specific settings to spread across several environment variables.This change introduces one generic auth-provider JWT verification path that supports both existing Supabase-style HMAC tokens and JWKS-backed providers. It keeps the old Supabase headers as compatibility aliases, while adding provider-neutral bearer token and team header schemes.
Summary
SUPABASE_JWT_SECRETSwith one structuredAUTH_PROVIDER_CONFIGJSON value.github.com/MicahParks/keyfunc/v3/jwksetfor JWKS lookup, caching, and refresh.user_id_claimto resolve directly to an internal UUID; no email fallback.X-Team-Idteam header in both API and dashboard API, while keeping Supabase headers as compatibility aliases.Config shape
JWKS:
{ "jwt": { "issuer": "https://issuer.example.com", "audience": "dashboard-api", "user_id_claim": "sub", "jwks": { "url": "https://issuer.example.com/.well-known/jwks.json", "cache_duration": "5m" } } }HMAC:
{ "jwt": { "user_id_claim": "sub", "hmac": { "secrets": ["secret-1", "secret-2"] } } }Both can be configured together during migration/rotation:
{ "jwt": { "issuer": "https://issuer.example.com", "audience": "dashboard-api", "user_id_claim": "sub", "hmac": { "secrets": ["legacy-secret"] }, "jwks": { "url": "https://issuer.example.com/.well-known/jwks.json", "cache_duration": "5m" } } }