Overview
useRequestAccountDeletion returns a function that starts the self-service account-deletion flow for the currently authenticated user. It emails the user a 6-digit confirmation code (valid for 10 minutes) and does not delete anything on its own. Pass the code the user receives to useConfirmAccountDeletion to finish.
Usage Example
Parameters
The returned function takes no arguments — it always acts on the currently authenticated user.Returns
The hook returns an async function. That function resolves to:boolean
true when the request completes without a server error.
