You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(gdpr): revoke active sessions during user erasure
4
+
5
+
## Summary
6
+
7
+
Fixes #821.
8
+
9
+
GDPR erasure previously anonymized the user profile but left Redis-backed sessions and refresh-token material intact. This allowed an erased user to continue authenticating with previously issued session state.
10
+
11
+
## What changed
12
+
13
+
- Added session revocation during GDPR erasure by deleting all Redis sessions belonging to the user.
14
+
- Cleared the user's refresh token during erasure so old refresh-token-based flows are invalidated.
15
+
- Added regression tests covering both:
16
+
- GDPR erasure invoking session cleanup, and
17
+
- session service removal of all sessions for a specific user.
18
+
19
+
## Why
20
+
21
+
This brings the erasure flow into compliance with GDPR data-erasure expectations by ensuring previously valid session state is invalidated immediately when a user is erased.
22
+
23
+
## Testing
24
+
25
+
Verified locally with:
26
+
27
+
```bash
28
+
cd /home/gift/teachLink_backend && npx jest --runInBand src/modules/gdpr/tests/gdpr.service.spec.ts src/session/session.service.spec.ts
0 commit comments