Skip to main content

Interface: AccessTokenSigningOptions

Defined in: auth-core/src/oauthServerTypes.ts:398

Built-in access-token minting with an asymmetric key, so an app needs no signing code of its own and a third party verifies tokens through the advertised jwks_uri alone.

Properties​

accessTokenTtl?​

optional accessTokenTtl?: number

Defined in: auth-core/src/oauthServerTypes.ts:407

Access-token lifetime in seconds, surfaced as expires_in. Keep the key set's retiredKeyTtl at least this long, so rotating a key never invalidates a live token.

Default​

3600

claims?​

optional claims?: (args) => Record<string, unknown> | Promise<Record<string, unknown>>

Defined in: auth-core/src/oauthServerTypes.ts:413

Extra claims for the access token (tenant, roles, …). The registered claims — iss, sub, aud, exp, iat, jti, scope, client_id — are set by the engine and cannot be overridden from here.

Parameters​

ParameterType
argsIssueTokensArgs

Returns​

Record<string, unknown> | Promise<Record<string, unknown>>


issueRefreshToken?​

optional issueRefreshToken?: (args) => string | Promise<string | undefined> | undefined

Defined in: auth-core/src/oauthServerTypes.ts:420

Mints the refresh token returned beside the access token — typically createRefreshRotation(...).issue. Omit it to issue access tokens only.

Parameters​

ParameterType
argsIssueTokensArgs

Returns​

string | Promise<string | undefined> | undefined


keySet​

keySet: SigningKeySet

Defined in: auth-core/src/oauthServerTypes.ts:400

The keys to sign with and publish — see createSigningKeySet.