auth/token_lifetime.ts view source
(lifetime: { kind: "eternal"; } | { kind: "ttl"; days: number; }, now?: Date): Date | null import {token_lifetime_to_expires_at} from '@fuzdev/fuz_app/auth/token_lifetime.js'; Resolve a lifetime input to the expires_at value the mint query stores.
lifetime
the validated lifetime input
now
mint time (injectable for tests; defaults to the current time)
Datenew Date()returns
Date | null
the expiry Date, or null for an eternal token