Khalil Patiwala
03/30/2026, 11:25 AMDevRev
03/30/2026, 11:25 AMcurl -X POST "<https://api.descope.com/v1/mgmt/user/logout>"
-H "Authorization: Bearer <ProjectId:ManagementKey>"
-H "Content-Type: application/json"
-d '{"loginId": "<mailto:user@example.com|user@example.com>"}'
Backend SDK Logout All Sessions
For individual users, you can invalidate all their sessions using the Backend SDK :
const refreshToken = "xxxx"
const resp = await descopeClient.logoutAll(refreshToken);
Bulk Operations Approach
Descope doesn't have a single API endpoint to logout all users at once. For bulk invalidation, you would need to:
1. Use the Search Users API to get all active users
2. Loop through each user and call the logout endpoint individually
3. Alternatively, use JWK rotation with revocation for immediate invalidation
JWK Rotation for Global Invalidation
For urgent situations, you can use JWK key rotation with revocation . In the Descope Console, go to Project Settings → JWK Rotation and select "Rotate and Revoke" - this will force all users to re-login immediately.
Since you mentioned this is urgent, the JWK rotation approach would be the fastest way to invalidate all active sessions across your entire project.
Delete User's Passkeys | API Reference | Descope Documentation
Backend SDK Session Validation | Descope Documentation
JWK Rotation | Descope DocumentationKhalil Patiwala
03/30/2026, 11:26 AMKhalil Patiwala
03/30/2026, 11:26 AMDevRev
03/30/2026, 11:26 AMMeir Wahnon
03/30/2026, 11:28 AMMeir Wahnon
03/30/2026, 11:28 AMKhalil Patiwala
03/30/2026, 11:28 AMKhalil Patiwala
03/30/2026, 11:28 AMKhalil Patiwala
03/30/2026, 11:29 AMMeir Wahnon
03/30/2026, 11:29 AMMeir Wahnon
03/30/2026, 11:30 AMDoron Sharon
03/30/2026, 11:32 AMDoron Sharon
03/30/2026, 11:34 AMDoron Sharon
03/30/2026, 11:35 AMKhalil Patiwala
03/30/2026, 11:36 AMyou need to block at your app levelCan u provide a snippet on how it would look like?
Doron Sharon
03/30/2026, 11:37 AMDoron Sharon
03/30/2026, 11:37 AMDoron Sharon
03/30/2026, 11:37 AMKhalil Patiwala
03/30/2026, 11:37 AMKhalil Patiwala
03/30/2026, 11:38 AMDoron Sharon
03/30/2026, 11:38 AMDoron Sharon
03/30/2026, 11:38 AMKhalil Patiwala
03/30/2026, 11:38 AMKhalil Patiwala
03/30/2026, 11:38 AMDoron Sharon
03/30/2026, 11:38 AMDoron Sharon
03/30/2026, 12:25 PMKhalil Patiwala
03/30/2026, 12:26 PMKhalil Patiwala
03/30/2026, 12:26 PMKhalil Patiwala
03/30/2026, 12:26 PMKhalil Patiwala
03/30/2026, 12:26 PMKhalil Patiwala
03/30/2026, 12:27 PMKhalil Patiwala
03/30/2026, 12:27 PMDoron Sharon
03/30/2026, 12:27 PMKhalil Patiwala
03/30/2026, 12:28 PMDoron Sharon
03/30/2026, 12:29 PMDoron Sharon
03/30/2026, 12:29 PMDoron Sharon
03/30/2026, 12:39 PMDoron Sharon
03/30/2026, 12:40 PMKhalil Patiwala
03/30/2026, 12:41 PMKhalil Patiwala
03/30/2026, 5:12 PMDS cookie as a fallback when no Authorization header is present.
What happened:
After the switch, users who were already logged in started seeing other users' identities -- different name, email, and tenant. This was not a UI bug; the API was returning a completely different user's data. The affected users:
• Were logged in with active sessions before we switched to cookie mode
• Did NOT log out and log back in -- their sessions were "live" during the mode switch
• Did not share browsers with other users
The issue resolved immediately after we reverted both the Descope config (back to client-side token management) and our code changes.
What we need to understand:
1. When switching from client-side to cookie-based token management, what happens to existing active sessions? Are they migrated, invalidated, or left in a stale state?
2. Does the SDK's session refresh mechanism (using the DSR refresh token) behave differently during or after a mode switch? Could a refresh during the transition issue a DS cookie containing a different user's JWT?
3. Is there a recommended migration path for switching to cookie mode without disrupting active sessions? (e.g., should we force all users to re-authenticate first?)
4. Could descopeClient.management.user.loadByUserId('') (empty string) return a real user instead of an error? We have a code path where a management API failure could result in an empty user ID being passed to this function.Chris Carper
03/30/2026, 5:35 PMBhagwanta Yeole
03/30/2026, 6:22 PMKhalil Patiwala
03/30/2026, 6:37 PMAditya Arakal
03/30/2026, 6:50 PMKhalil Patiwala
03/30/2026, 7:30 PM2026-03-30 10:30-11:30 UTC ?Aditya Arakal
03/30/2026, 7:43 PMKhalil Patiwala
03/30/2026, 7:45 PMKhalil Patiwala
03/30/2026, 7:45 PM