Skip to main content
Version: Next (2.x)

AuthOptions<Scopes, Grants>

Configuration options for Auth

Type Parameters

Type Parameter

Scopes extends ScopesShape

Grants extends string

Properties

PropertyTypeDescription

cacheKeyMap?

ScopeCacheKeyMap<Scopes>

Per-scope cache key overrides. Recommended for scopes whose argument isn't safely auto-serializable: serializable args (primitives, plain objects, arrays of those) are stringified automatically, and anything else falls back to reference identity — which may miss cache hits when callers construct equivalent-but-distinct values.

defaultScopes?

(opt) => DefaultScopes<Scopes, Grants>

Default authorization scopes for queries, mutations or subscriptions

errorResolver?

ScopeErrorResolver

Custom error resolver for authorization failures