Skip to main content

Interface: RefreshRotation

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

The refresh-rotation helpers returned by createRefreshRotation.

Properties​

issue​

issue: (args) => Promise<string>

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

Mint and persist a new opaque refresh token, returning the plaintext value to hand back to the client. Call this from your issueTokens hook so every issued refresh token is tracked for rotation.

Parameters​

ParameterType
argsIssueRefreshTokenArgs

Returns​

Promise<string>


onRefreshToken​

onRefreshToken: (args) => Promise<OnRefreshTokenResult>

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

A ready onRefreshToken implementation: validates the presented token, enforces single use, expiry, and per-owner reuse detection, then approves the refresh. Pass it straight to createOAuthHandlers.

Parameters​

ParameterType
argsOnRefreshTokenArgs

Returns​

Promise<OnRefreshTokenResult>