Skip to content

Add configurable JWT clock-skew tolerance - #1302

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
reactjay:fix/jwt-clock-skew-1152
Aug 30, 2026
Merged

Add configurable JWT clock-skew tolerance#1302
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
reactjay:fix/jwt-clock-skew-1152

Conversation

@reactjay

Copy link
Copy Markdown
Contributor

Summary

This PR adds a configurable JWT clock-skew tolerance so tokens are not rejected when server/client clocks differ by a few seconds.

Changes

  • Added JWT_CLOCK_SKEW_MS config resolution in src/config/environment.ts
  • Updated JWT exp/nbf validation in src/lib/auth/jwt.ts to respect the configured leeway
  • Added focused regression coverage in src/lib/auth/__tests__/jwt.test.ts

Fixes

Closes #1152

@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@reactjay Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

thank you for contributing to the project.

@RUKAYAT-CODER
RUKAYAT-CODER merged commit 756d231 into rinafcode:main Aug 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add configurable JWT clock-skew tolerance to token verification

2 participants