Skip to main content

Deleting roles

You can delete any role you have created, if the role you are trying to delete does not exist then this has no effect

import UserRoles from "supertokens-node/recipe/userroles";

async function deleteRole() {
// Delete the user role
const response = await UserRoles.deleteRole("user");

if (!response.didRoleExist) {
// There was no such role
}
}
Which frontend SDK do you use?
supertokens-web-js / mobile
supertokens-auth-react