Skip to content

fix(frontend): simplify token validation logic and improve test cover…#686

Merged
rav3n11 merged 1 commit intomainfrom
fix/remove-token-not-yet-valid-CORE-94
Feb 25, 2026
Merged

fix(frontend): simplify token validation logic and improve test cover…#686
rav3n11 merged 1 commit intomainfrom
fix/remove-token-not-yet-valid-CORE-94

Conversation

@rav3n11
Copy link
Collaborator

@rav3n11 rav3n11 commented Feb 25, 2026

…age for expiration and clock skew scenarios

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR simplifies frontend JWT token validation by removing client-side iat (“issued at”) checks (to better tolerate client/server clock skew) and updates unit tests to reflect the new behavior.

Changes:

  • Removed TOKEN_NOT_YET_VALID failure cause and the iat-based “issued in the future” invalidation logic.
  • Kept expiration (exp) validation with clock tolerance and warning behavior.
  • Updated isTokenValid tests to cover expired tokens and future-iat (clock skew) tokens.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
frontend-new/src/auth/services/Authentication.service.ts Removes iat-based validation and the associated failure cause from token validation.
frontend-new/src/auth/services/Authentication.service.test.ts Reworks timing-related tests to assert expired tokens fail and future-iat tokens pass.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rav3n11 rav3n11 merged commit c9e3491 into main Feb 25, 2026
12 checks passed
@rav3n11 rav3n11 deleted the fix/remove-token-not-yet-valid-CORE-94 branch February 25, 2026 06:47
@rav3n11 rav3n11 restored the fix/remove-token-not-yet-valid-CORE-94 branch February 26, 2026 06:07
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.

2 participants