Reject expired API tokens
Version: 1.2.0 Date: 2026-10-18
Goal: Neo must not authenticate an API token whose exp is already in the past.
Solution: AuthService.getApiTokenUser throws before the user is loaded when apitokens.exp is a past date. The authorization middleware turns that into 401. exp null or absent stays valid. The apitokens row is not deleted.
Features:
- Past
exp→ 401, user not authenticated expnull or missing → token still accepted- No delete of the
apitokensrow
Files Modified:
src/core/auth/auth.service.ts- Expiry check on API token lookupsrc/core/auth/auth.service.spec.ts- Past, null, and missingexp
Release fragment: fix-reject-expired-api-tokens