Skip to main content

Delete user

important

This is applicable for supertokens core version >= 3.7.

This feature allows you delete a user from the SuperTokens based on their user ID.

let {deleteUser} = require("supertokens-node");
let userId = "..." // get the user ID somehow...await deleteUser(userId); // this will succeed even if the userId didn't exist.
caution
  • Calling this function will permanently remove all information associated with this user, including their sessions.
  • If this user has an active access token, and you have not enabled access token blacklisting, session verificaiton will still succeed until their access token expires. After that, they will be logged out since session refresh will fail.