Hi, We are removing a user from our database and ...
# support-questions-legacy
e
Hi, We are removing a user from our database and supertokens
Copy code
js
      if (superTokensId) {
        await Session.revokeAllSessionsForUser(superTokensId)
        await supertokens.deleteUser(superTokensId)
      }
Is this the right way to do it? When testing this behaviour the on the frontend the user keeps having a valid session + a payload
Copy code
js
 const validSession = await doesSessionExist()
  const payload = (await getAccessTokenPayloadSecurely()) as Payload
2 Views