Overview
JwtStrategy.validate() (backend/src/auth/strategies/jwt.strategy.ts) looks up the user by payload.sub and returns them if found — it never checks user.isActive. UsersService.setActive(id, false) exists specifically to deactivate an account, but a deactivated user's still-unexpired access token continues to authenticate successfully against every guarded route until it naturally expires.
Tasks
Acceptance Criteria
Notes for Contributors
Comment below to be assigned.
Overview
JwtStrategy.validate()(backend/src/auth/strategies/jwt.strategy.ts) looks up the user bypayload.suband returns them if found — it never checksuser.isActive.UsersService.setActive(id, false)exists specifically to deactivate an account, but a deactivated user's still-unexpired access token continues to authenticate successfully against every guarded route until it naturally expires.Tasks
isActivecheck invalidate(), throwingUnauthorizedExceptionfor a deactivated user.setRefreshTokenHash(id, null)) so a deactivated user can't silently refresh either.Acceptance Criteria
/auth/refresh.Notes for Contributors
Comment below to be assigned.