Reference

runWithAuthRequest

Runs server-side auth work inside an AsyncLocalStorage-backed request scope. Use this around custom server rendering or tests so `getSessionClaims()` can read request-local claims.

Signature

function runWithAuthRequest<T>(fn: (): T | Promise<T>, options: AuthRequestOptions): Promise<Awaited<T>>