Skip to content

isExpiredAt

isExpiredAt(expiresAt, bufferSeconds?): boolean

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

Checks whether a token has expired given an absolute expiration timestamp in seconds. Returns false if expiresAt is null (the token is treated as non-expiring).

number | null

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

number = DEFAULT_EXPIRY_BUFFER

Buffer in seconds subtracted from expiry to account for clock skew and network latency.

boolean

true if the current time is at or past the buffered expiry time.