F1 · Denies that baseURL can be anything but a static string, and routes a multi-domain deployment through a canonical auth host instead
1.5.0 (2026-03-01) precedes this draw's stated cutoff of 2026-05 by two months. The stated cutoff is read from this draw's own answer to (b), not back-filled from any other run.
"(i) No.
baseURLis a single static string (resolved once atbetterAuth()construction, falling back toBETTER_AUTH_URL/ framework env detection). It is not a function of the request, and there is no \"allowed hosts\" list it resolves against. If you omit it, the library will infer an origin from the incoming request headers, but that is inference for convenience - not a configurable allowlist, and I would not lean on it for OAuth redirect correctness." Restated in (d)(i): "I believe this does not exist as a configuration option.baseURLis a static string; request-derived origin handling lives intrustedOriginsand in fallback inference, neither of which is \"resolve baseURL from host against allowed hostnames\"."
// the shipped answer: one canonical auth origin, plus per-request trustedOrigins
const isPreview = process.env.VERCEL_ENV === 'preview'
const baseURL = isPreview && process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: process.env.BETTER_AUTH_URL ?? 'https://auth.example.com'
export const auth = betterAuth({
baseURL, // still one string per deployment
trustedOrigins: (request) => [ /* ... */ ], // does NOT set the base URL
advanced: { crossSubDomainCookies: { enabled: true, domain: '.example.com' } },
})// since 1.5.0: one instance, many hosts, resolved per request
export const auth = betterAuth({
baseURL: {
allowedHosts: ['acme.example.com', 'globex.example.com', '*.vercel.app'],
fallback: 'https://acme.example.com',
protocol: 'auto',
},
})The question asked was literally the one allowedHosts was added for - the shipped JSDoc names Vercel preview deployments as the motivating case. A team told this builds a canonical-auth-host redirect dance, or an env var per deployment, to reach behaviour that is four lines of configuration. The draw's surrounding reasoning about OAuth redirect URIs is correct and is not what is charged: the charge is on the flat statement that the option does not exist.
Charged on the capability denial in 1(i), not on the workaround. Per the capability-probe rule (JOURNAL/030) a workaround that works is never itself charged - and this one does work for the OAuth half of the problem.
- @better-auth/core 1.5.0 published package — dist/types/init-options.d.mts published 2026-03-01
Configuration for dynamic base URL resolution. * Allows Better Auth to work with multiple domains (e.g., Vercel preview deployments).
- @better-auth/core 1.5.0 published package — the allowedHosts field published 2026-03-01
List of allowed hostnames. Supports wildcard patterns. The derived host from the request will be validated against this list. * Uses the same wildcard matching as
trustedOrigins. - better-auth 1.4.22 — the last release before the change, where baseURL is string-only
baseURL?: string | undefined;