Hi, which alternative should I use to revoke sessi...
# support-questions-legacy
a
Hi, which alternative should I use to revoke session if TOKEN_THEFT_DETECTED?
Copy code
// 1
if (error.type === Session.Error.TOKEN_THEFT_DETECTED) {
  await Session.revokeSession(event.session.getHandle());
}

// OR 2
if (error.type === Session.Error.TOKEN_THEFT_DETECTED) {
  await event.session.revokeSession();
}
r
hey @Alankazam the second method is preferable
4 Views