Join Discord
Powered by
Is it possible to revoke all sessions of a user ex...
# support-questions-legacy
e
execreate
10/19/2022, 11:29 AM
Is it possible to revoke all sessions of a user except the current one?
n
nkshah2
10/19/2022, 11:30 AM
Hi
nkshah2
10/19/2022, 11:31 AM
You can use
https://supertokens.com/docs/session/common-customizations/sessions/fetch-sessions-for-user
to fetch all sessions for a user Filter the list and remove the session handle that you want to keep Then use
https://supertokens.com/docs/session/common-customizations/sessions/revoke-session#method-3-revoking-multiple-sessions-using-an-array-of-sessionhandle
to revoke the rest
e
execreate
10/19/2022, 11:32 AM
Hey
@nkshah2
, thanks a lot 🙂
n
nkshah2
10/19/2022, 11:32 AM
Happy to help
2
Views
Previous
Next