Function: findExpiringTokens()
findExpiringTokens<
T>(records,options?):T[]
Defined in: tokens.ts:18
Filter a list of token records down to those that expire within windowMs
from now (default 6 hours). Intended for a scheduled job that proactively
refreshes tokens before they lapse, keeping connections alive for inactive
users. Pure and provider-agnostic — it inspects only accessTokenExpiresAt.
Type Parameters
| Type Parameter |
|---|
T extends TokenRecord |
Parameters
| Parameter | Type |
|---|---|
records | T[] |
options? | FindExpiringTokensOptions |
Returns
T[]