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.

import {deleteUser} from "supertokens-node";

async function deleteUserForId() {
let userId = "..." // get the user ID
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.
Which UI do you use?
Custom UI
Pre built UI