Skip to content

fix: remove Auth0Server dependency from getClaims and requireClaims - #10

Open
yogeshchoudhary147 wants to merge 1 commit into
mainfrom
fix/api-only-config
Open

fix: remove Auth0Server dependency from getClaims and requireClaims#10
yogeshchoudhary147 wants to merge 1 commit into
mainfrom
fix/api-only-config

Conversation

@yogeshchoudhary147

Copy link
Copy Markdown
Contributor

Summary

  • getClaims and requireClaims no longer require a full Auth0Server config
  • verifyJwt now reads AUTH0_DOMAIN and AUTH0_AUDIENCE directly from env vars instead of calling getInstance(), which triggered the full session config validation
  • API-only deployments now only need two env vars instead of five

Before this fix, a developer using only requireClaims was forced to set AUTH0_CLIENT_ID, AUTH0_CLIENT_SECRET, AUTH0_SESSION_SECRET, and AUTH0_APP_BASE_URL — none of which are used during JWT verification.

Test plan

  • requireClaims / getClaims work with only AUTH0_DOMAIN + AUTH0_AUDIENCE set
  • ConfigurationError thrown when AUTH0_DOMAIN is missing
  • ConfigurationError thrown when AUTH0_AUDIENCE is missing
  • Full SSR session flow unaffected
  • npx vitest run — all 320 tests pass

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