Skip to main content

Interface: RefreshRotationOptions

Defined in: auth-core/src/refreshTokenRotation.ts:37

Configuration for createRefreshRotation.

Properties​

generateToken?​

optional generateToken?: () => string

Defined in: auth-core/src/refreshTokenRotation.ts:49

Override the opaque-token generator. Defaults to 32 random bytes, base64url-encoded. Useful for deterministic tests.

Returns​

string


hashToken?​

optional hashToken?: (token) => string

Defined in: auth-core/src/refreshTokenRotation.ts:54

Override the token hashing function used before persistence. Defaults to SHA-256 (hex). The plaintext token is never stored.

Parameters​

ParameterType
tokenstring

Returns​

string


refreshTokenTtl?​

optional refreshTokenTtl?: number

Defined in: auth-core/src/refreshTokenRotation.ts:44

Refresh-token lifetime in seconds.

Default​

2592000 (30 days)

store​

store: RefreshTokenStore

Defined in: auth-core/src/refreshTokenRotation.ts:39

App-provided persistence for refresh tokens.