Skip to main content

Delete user


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.
  • 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 verification will still succeed until their access token expires. After that, they will be logged out since session refresh will fail.
Looking for older versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI