Repository navigation
feat: add current param to deleteSessions endpoint - #13990
Conversation
Adds optional bool param current (default true) to DELETE /account/sessions. When false, all sessions except the calling session are deleted, allowing sign-out everywhere while staying signed in on the current device. Uses the session resource from appwrite#13900 so JWT auth works correctly for both cookie and JWT authenticated callers. X-Fallback-Cookies header is now only sent when current=true to avoid wiping the caller's stored session cookie when signing out other sessions. E2E tests cover cookie and JWT auth paths with three-session setup per spec: other two sessions get 401, calling session stays 200, listSessions returns exactly one session marked current.
🟢 Tier S · Ready to merge
This adds an optional boolean Latest changes: Added a guard that throws USER_SESSION_NOT_FOUND when
Note @jaysomani does not have write access to this repository, so Hansi does not approve automatically. A maintainer can review and approve. 📂 Walkthrough · 3
Reviewed the commits since |
|
Adds optional bool param current (default true) to DELETE /account/sessions. When false, all sessions except the calling session are deleted, allowing sign-out everywhere while staying signed in on the current device.
Uses the session resource from #13900 so JWT auth works correctly for both cookie and JWT authenticated callers.
X-Fallback-Cookies header is now only sent when current=true to avoid wiping the caller's stored session cookie when signing out other sessions.
E2E tests cover cookie and JWT auth paths with three-session setup per spec: other two sessions get 401, calling session stays 200, listSessions returns exactly one session marked current.
What does this PR do?
(Provide a description of what this PR does and why it's needed.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Screenshots may also be helpful.)
Related PRs and Issues
Checklist