Skip to content

fix: preserve verify_jwt setting when not in config.toml#5348

Open
deepshekhardas wants to merge 1 commit into
supabase:developfrom
deepshekhardas:fix/verify-jwt-deploy-preserve
Open

fix: preserve verify_jwt setting when not in config.toml#5348
deepshekhardas wants to merge 1 commit into
supabase:developfrom
deepshekhardas:fix/verify-jwt-deploy-preserve

Conversation

@deepshekhardas
Copy link
Copy Markdown

Changes

Changes the unction.VerifyJWT field from �ool to *bool across the codebase to distinguish between "not configured" and "explicitly set to false".

Files modified

  • pkg/config/config.go: Changed VerifyJWT type from �ool to *bool
  • internal/functions/deploy/deploy.go: Removed hardcoded VerifyJWT = true for functions not in config.toml; flag override now sets pointer properly
  • pkg/function/deploy.go: Updated reference to match new pointer type
  • pkg/function/batch.go: Updated comparison and assignment for *bool
  • internal/functions/serve/serve.go: Defaults to rue when *bool is nil for local serve
  • pkg/function/batch_test.go: Updated test to use cast.Ptr(true)

Rationale

Previously, the CLI always sent �erify_jwt: true in deploy metadata for functions not listed in config.toml, overwriting the dashboard setting. With this fix, when �erify_jwt is not specified in config.toml, the field is omitted from the deploy payload (
il), allowing the API to preserve the existing server-side value.

Fixes #43608

Changes VerifyJWT field from bool to *bool so the CLI can distinguish
between 'not configured' and 'explicitly set to false'. When verify_jwt
is not present in config.toml, the field is omitted from deploy metadata
(nil), allowing the API to preserve the existing server-side setting
instead of defaulting to true and overwriting the dashboard value.

Fixes #43608
@deepshekhardas deepshekhardas requested a review from a team as a code owner May 25, 2026 11:29
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.

1 participant