Request headers from the current context.
In App Router Server Components / Server Actions: obtained via headers() from next/headers.
In Middleware / Route Handlers: extracted from NextRequest.
In Pages Router (getServerSideProps, API Routes): extracted from IncomingMessage.
Optionalurl?: URLThe request URL, when available.
In Middleware / Route Handlers: the full NextRequest.nextUrl (includes pathname, search params).
In Pages Router: constructed from IncomingMessage.url + Host header.
In App Router Server Components / Server Actions: undefined (no request object exists).
Use this for B2B multi-tenant routing where the application hostname determines the Auth0 domain.
The Auth0 custom domain hostname (e.g., "auth.brand1.com").
Can be returned synchronously or as a Promise.
Must throw on resolution failure — the SDK wraps thrown errors in DomainResolutionError.
The resolver is responsible for preventing Host Header injection attacks.
The SDK validates the resolver's output via normalizeDomain (hostname format validation),
but input validation and SSRF prevention are the customer's responsibility.
Resolves the Auth0 domain from request context. Called once per SDK operation in resolver mode.
Supports both synchronous and asynchronous resolution patterns.