feat: add support for Dynamic App Base URL#53
Conversation
|
Warning Review limit reached
More reviews will be available in 57 minutes and 45 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (28)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Adds dynamic application base URL support to
@auth0/auth0-nuxt, allowing a single Nuxt app to serve multiple origins from one Auth0 application.appBaseUrlnow supports three modes:"https://app.example.com") — unchanged current behavior.["https://a.com", "https://b.com"], or comma-separated viaNUXT_AUTH0_APP_BASE_URL) — the request origin is matched against the list. Recommended for production.x-forwarded-host/x-forwarded-proto.Changes
runtime/server/utils/app-base-url.ts—isUrl,inferBaseUrlFromRequest,resolveAppBaseUrl(uses h3'sgetRequestHost/getRequestProtocol).runtime/server/utils/config.ts—parseAppBaseUrl,validateAppBaseUrl,enforceSecureCookies,resolveAuth0Options. Comma-separated parsing, validation, and production secure-cookie enforcement. Returns a new options object (the Nuxt runtime config is frozen).auth.server.ts— resolves/validates options; the hardappBaseUrlrequired-check is removed (dynamic mode omits it).use-auth0.ts— only bakes a staticredirect_uri; in dynamic/allow-list mode the login handler supplies it per request.appBaseUrl?: string | string[];InvalidConfigurationErrorre-exported from the module entry.examples/example-nuxt-web-dynamic-app-base-url(two-host allow-list demo).Design spec and implementation plan are included under
docs/superpowers/.Test Plan
npm run test:unit— 76 passing, +32 new across resolver, config, and the three handlers)npm run lint)npm run build),InvalidConfigurationErrorexportednpm run test:e2e) — runs in CI with Auth0 tenant secrets (live login flow); not runnable locally without credentials