Deleting users
Privy allows you to delete users via their Privy DID. This is an irreversible and destructive action; if the user logs into your app again, they will have a new DID, will have to relink any formerly linked accounts, and will get a new embedded wallet address.
Please take extreme care when deleting users. For security of user assets, Privy does not delete the embedded wallet, and instead “soft deletes” it by disassociating it from the deleted user. If the user still has access to their login method and their wallet password, if they have set one, their wallet can be recovered after deletion.
Use the PrivyClient
’s deleteUser
method to delete a user. As a parameter, pass the user’s Privy DID as a string
:
Complete Example
This method will throw an error if the deletion operation failed (e.g. due to an invalid Privy DID).
Was this page helpful?