JWT Error: `TokenExpiredError` / `nbf` Not Yet Valid (Clock Skew)
Server system clock drifted behind/ahead of the token issuer.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.1.0
Identifier: JWT Error
Platform: Security
Common Root Causes:
- Server system clock drifted behind/ahead of the token issuer.
Interactive Diagnostic Checklist
Verified Solutions:
- Sync server clock with Chrony/NTP and allow small clock tolerance (e.g. 30s) in JWT verifier.
Safe Diagnostic Command:
date -u && chronyc tracking
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
Server system clock drifted behind/ahead of the token issuer. Recommended diagnostic: `date -u && chronyc tracking`. Remediation: Sync server clock with Chrony/NTP and allow small clock tolerance (e.g. 30s) in JWT verifier.
Worked Examples
- Run `date -u && chronyc tracking` to verify root cause before applying the remediation.
Limitations & Assumptions
- Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.
Source References & Verification
Resource ID: err-jwt-token-expired-clock-skew · Independently verified: 2026-11-25