Skip to content

fix: skip unused environment settings when creating clients - #210

Open
shoemoney wants to merge 1 commit into
supabase:mainfrom
shoemoney:fix/lazy-env-resolution
Open

shoemoney wants to merge 1 commit into
supabase:mainfrom
shoemoney:fix/lazy-env-resolution

Conversation

@shoemoney

Copy link
Copy Markdown

Creating a context client reads secret keys and JWKS settings that it never uses. The admin client does the same with publishable keys and JWKS. In Deno, either can fail when the process only has permission to read the variables that client needs.

The client factories now request their URL and key set through an internal field selector. The public resolveEnv() still resolves the full configuration, with the same precedence and errors.

Fixes #201.

Both new permission tests fail before the fix. All 589 tests pass afterward. Tests, build and type checks pass on Node 22.22.3 and 26.13.1. Lint, example type checks, dependency checks, package smoke tests, export checks and the JSR publish dry-run also pass. The local-stack E2E suite wasn't run.

@shoemoney
shoemoney requested review from a team as code owners November 28, 2026 04:50

This branch has not been deployed

No deployments
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.

resolveEnv resolves the JWKS and secret keys for clients that never verify

1 participant