Recommended secure architecture for self-service account deletion in a native iOS app

Hi Auth0 Community,

We’re preparing UNIFAM, a native iOS app using Auth0 with Authorization Code Flow + PKCE. Users need to permanently delete their own account after reauthentication.

We understand that privileged Management API credentials must remain on the backend and must never be exposed to the mobile app. Our backend will also handle deletion of application data.

Before implementing the final integration, we’d appreciate clarification on:

  1. The Delete a User documentation lists delete:current_user. Is this permission available for native applications using PKCE? If so, how is it obtained and restricted to the authenticated user?
  2. If a backend Machine-to-Machine application with delete:users is required, can Auth0 restrict that permission to a particular connection or subset of users, or is it necessarily tenant-wide?
  3. What architecture does Auth0 recommend to minimize the impact of a compromised backend credential while supporting self-service deletion?
  4. How should deletion handle linked email/SMS identities and existing sessions or refresh tokens?

Our intended flow is: fresh reauthentication → backend verifies the requesting user → durable cleanup of application data → deletion of that user’s Auth0 account. The target identity would come from verified authentication, not a user-supplied account ID.

An official reference or a working example of the recommended approach would be very helpful.

Thank you!

Hi Mary Beth and team,

We’re working on UNIFAM, an iOS app built with React and Capacitor. Our users sign in with a one-time code sent by email or SMS, and we want them to be able to delete their own account from inside the app.

From the linked discussion, our understanding is that our backend should validate the user’s access token, take the user ID from the verified sub claim, and call the Auth0 Management API using a separate machine-to-machine token with the delete:users permission.

Could you confirm that this is the recommended setup and clarify two points for us?

  1. Which settings should we check in our Auth0 tenant to confirm that our backend is authorized to delete a user?
  2. For passwordless users, what’s the recommended way to require a fresh email or SMS code immediately before deletion, and how should our backend verify that the user completed that step?

Thanks for your help!
Truls, UNIFAM

Does Auth0 offer a self-service API that lets a signed-in user permanently delete only their own Auth0 account?

Our iOS app, UNIFAM, uses passwordless login by email or SMS. Can the user confirm deletion with a fresh one-time code and authorize it with their own access token? Or does our backend need a Management API token with the tenant-wide delete:users permission?

Thanks,
Truls, UNIFAM