Skip to content

timeUntilExpiry

timeUntilExpiry(expiresAt): number

Defined in: packages/core/src/token-utils.ts:42

Returns the number of seconds remaining until the token expires. Returns Infinity if expiresAt is null, or 0 if the token is already expired.

number | null

Expiration time as a Unix timestamp in seconds, or null.

number

Seconds remaining until expiry (never negative).