tokenExpiryLeeway top-level constant

Duration const tokenExpiryLeeway

How far ahead of its expiry the SDK stops trusting a token.

Without a margin a token with milliseconds left is judged valid, attached to a request, and rejected by the server - and since a write is deliberately never retried, the caller sees a failure rather than a transparent refresh. The same happens whenever the device clock trails the server's.

Implementation

const Duration tokenExpiryLeeway = Duration(seconds: 30);