# Reset password send to secondary email

**URL:** <https://community.auth0.com/t/reset-password-send-to-secondary-email/15695>\
**Category:** Get Help\
**Tags:** login, auth0\
**Created:** [September 20, 2018, 6:35am UTC](https://community.auth0.com/t/reset-password-send-to-secondary-email/15695 "2018-09-20T06:35:15Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jinesh.nair](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jinesh.nair](https://community.auth0.com/u/jinesh.nair)\
**Post date:** [September 20, 2018, 6:35am UTC](https://community.auth0.com/t/reset-password-send-to-secondary-email/15695/1 "2018-09-20T06:35:15Z")

</div>

I have an application, and users are created by API calls. The user information contains username, email, password etc. But is there any option to add the different user with same email id?

For example,  
User 1 - Username- abc1, email - [abc@gmail.com](mailto:abc@gmail.com),password - … etc.  
User 2 - Username- abc2, email - [abc@gmail.com](mailto:abc@gmail.com),password - … etc.

And also I want to send reset password email to [abc@gmail.com](mailto:abc@gmail.com). How can I do it?

---

<div class="post-metadata">

**Author:** ![thijmen96](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/thijmen96/32/20356_2.png) [@thijmen96](https://community.auth0.com/u/thijmen96)\
**Post date:** [September 20, 2018, 7:52am UTC](https://community.auth0.com/t/reset-password-send-to-secondary-email/15695/2 "2018-09-20T07:52:50Z")

</div>

You cannot have two users with the same email address in the same database for the exact reason you mention: Auth0 would have no way of knowing what user the password reset would be for.

---

<div class="post-metadata">

**Author:** ![jinesh.nair](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jinesh.nair](https://community.auth0.com/u/jinesh.nair)\
**Post date:** [September 20, 2018, 7:56am UTC](https://community.auth0.com/t/reset-password-send-to-secondary-email/15695/3 "2018-09-20T07:56:15Z")

</div>

> [@jinesh.nair](#):
>
> Username- abc1

Yes, right. But using User name instead email for identify the user. Is it possible ? And reset password link send to email.

---

<div class="post-metadata">

**Author:** ![thijmen96](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/thijmen96/32/20356_2.png) [@thijmen96](https://community.auth0.com/u/thijmen96)\
**Post date:** [September 20, 2018, 7:59am UTC](https://community.auth0.com/t/reset-password-send-to-secondary-email/15695/4 "2018-09-20T07:59:53Z")

</div>

No, Auth0 will still use the email as the unique ID for the user, even when also using usernames. 😕

---

<div class="post-metadata">

**Author:** ![jinesh.nair](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jinesh.nair](https://community.auth0.com/u/jinesh.nair)\
**Post date:** [September 20, 2018, 8:04am UTC](https://community.auth0.com/t/reset-password-send-to-secondary-email/15695/5 "2018-09-20T08:04:21Z")

</div>

😔 Ok. Then is there any option to send reset password link another email(like secondary email). Not to login email.

Example,  
User 1 - Username- abc1, email - [abc@gmail.com](mailto:abc@gmail.com),secondary\_email- [xyz@gmail.com](mailto:xyz@gmail.com).

Login with email [-abc@gmail.com](mailto:-abc@gmail.com)  
Reset password email sends to [xyz@gmail.com](mailto:xyz@gmail.com).

Is it possible ?

---

<div class="post-metadata">

**Author:** ![thijmen96](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/thijmen96/32/20356_2.png) [@thijmen96](https://community.auth0.com/u/thijmen96)\
**Post date:** [September 20, 2018, 8:15am UTC](https://community.auth0.com/t/reset-password-send-to-secondary-email/15695/6 "2018-09-20T08:15:11Z")

</div>

Yes, but this would require some coding off your own.

The Management API allows you to request a [Password Reset ticket](https://auth0.com/docs/api/management/v2#!/Tickets/post_password_change). This is not the same as sending the reset email. The ticket is just the URL users need to visit to reset their password. So, here’s what you could do:

1. Have a page where users enter their usernames
2. Query the Management API for that user, get their secondary email
3. Request a Password Reset ticket for that user ID
4. Send a custom email to the secondary email

Sending that email doesn’t have to be hard, either. For our Auth0 deployment, we use SendGrid. They also provide a way to call their API and send an email with a predefined template (so you only have to send the email and ticket URL to the API). I’m sure other email providers allow you to do something similar.

---

<div class="post-metadata">

**Author:** ![jinesh.nair](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@jinesh.nair](https://community.auth0.com/u/jinesh.nair)\
**Post date:** [September 20, 2018, 8:24am UTC](https://community.auth0.com/t/reset-password-send-to-secondary-email/15695/7 "2018-09-20T08:24:10Z")

</div>

😀 Thank you. One more help, how can create a new field (secondary email) in database?

---

<div class="post-metadata">

**Author:** ![thijmen96](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/thijmen96/32/20356_2.png) [@thijmen96](https://community.auth0.com/u/thijmen96)\
**Post date:** [September 20, 2018, 8:25am UTC](https://community.auth0.com/t/reset-password-send-to-secondary-email/15695/8 "2018-09-20T08:25:29Z")

</div>

You can use `user_metadata` or `app_metadata`, depending on if you want the user to be able to easily edit the field. Those two fields are regular JSON objects, so you can store anything you want in there.

> **[Understand How Metadata Works in User Profiles](https://auth0.com/docs/manage-users/user-accounts/metadata)**
>
> Describes Auth0 user, application, and client metadata. Learn how you can use metadata to store information that does not originate from an identity provider.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 26, 2019, 10:57am UTC](https://community.auth0.com/t/reset-password-send-to-secondary-email/15695/9 "2019-07-26T10:57:48Z")

</div>


