# Best practices for implementing reactivation of users?

**URL:** <https://community.auth0.com/t/best-practices-for-implementing-reactivation-of-users/183720>\
**Category:** Get Help\
**Tags:** user-already-exists, user-management\
**Created:** [March 11, 2025, 5:28pm UTC](https://community.auth0.com/t/best-practices-for-implementing-reactivation-of-users/183720 "2025-03-11T17:28:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![guzeev](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@guzeev](https://community.auth0.com/u/guzeev)\
**Post date:** [March 11, 2025, 5:28pm UTC](https://community.auth0.com/t/best-practices-for-implementing-reactivation-of-users/183720/1 "2025-03-11T17:28:54Z")

</div>

In my application, user can delete their account. They should also be able to reactivate their account using the same sign up form that is used to register new users. We are using Auth0 for our authentication and sign up flows. So, when user tries to reactivate his existing account using the sign up form, Auth0 returns “The user already exists.” error, which makes me wonder what is the best way of achieving the behavior that I described above?

If I should do it through Sign up form, how to override this check of “user exists therefore we should return an error”, and instead sign in the user, sending a request to backend to /reactivate?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 11, 2025, 10:12pm UTC](https://community.auth0.com/t/best-practices-for-implementing-reactivation-of-users/183720/3 "2025-03-11T22:12:17Z")

</div>

Hi @guzeev,

Welcome to the Auth0 Community!

If users are experiencing the “The user already exists” error, then it means that their account was not completely deleted. If a user were deleted permanently, not only would they be unable to “recover” their account, they would also be forced to sign up again.

If you need the users to “recover” their account, consider a soft delete (suspend account) option, where the account isn’t fully deleted, by adding a `user_metadata` boolean field to enforce this.

For example:

```auto
user_metadata:{
  "soft_delete": true
} 

```

If they would like to recover that account in the future, you would change the field and restore full access to the user’s profile.

As a nuclear option, you can also have a permanent delete option, and this would warn the user that deleting their account is irreversible.

Let me know if you have any follow-up questions on this.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![guzeev](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@guzeev](https://community.auth0.com/u/guzeev)\
**Post date:** [March 12, 2025, 12:47pm UTC](https://community.auth0.com/t/best-practices-for-implementing-reactivation-of-users/183720/4 "2025-03-12T12:47:12Z")

</div>

Thanks for your answer! `soft_delete` indeed blocks the user. However, the user is still not able to “sign up” into that blocked user to “recover” the account. To make it possible, I am trying to set up an Auth0 action that checks whether the user was deleted in pre-user-registration action, and if so, reactivate the user automatically.

I have another problem: How do I actually perform the request from an Auth0 action to my backend? In particular, maybe there is a webhook for that? Or do I have to do an HTTP request. If so, what is the best practice of storing secrets for authorization? Maybe I can access the Auth0 management token from my action and use that?

Thanks!

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [March 12, 2025, 5:09pm UTC](https://community.auth0.com/t/best-practices-for-implementing-reactivation-of-users/183720/5 "2025-03-12T17:09:30Z")

</div>

Hi @guzeev,

If you soft delete a user, they should be able to log in to their account without signing up again. This is because their account has not been permanently deleted. Therefore, if they try to sign up, they will run into the “The user already exists” error for this scenario.

For this to work, you could use a post-login action instead to check the `user_metadata.soft_delete` field. If it’s true, you could [redirect](https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/redirect-with-actions) them to another page to see if they would like to recover their account. If it’s false, they can continue logging in as usual.

As for your second question, you can perform an HTTPS request to your backend in your Action. I suggest referring to [this knowledge article](https://community.auth0.com/t/how-to-make-an-axios-api-call-and-store-it-as-a-custom-claim-using-actions/84491) for an example to make this request.

For storing secrets, you can include them in the **Secrets** section in your Action script. I recommend checking out [this documentation](https://auth0.com/docs/customize/actions/write-your-first-action#add-a-secret) on how to accomplish this.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 26, 2025, 5:09pm UTC](https://community.auth0.com/t/best-practices-for-implementing-reactivation-of-users/183720/6 "2025-03-26T17:09:55Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
