---
id: auth-resetpasswordforemail
title: 'resetPasswordForEmail()'
slug: /auth-resetpasswordforemail
custom_edit_url: https://github.com/supabase/supabase/edit/master/spec/supabase_js_v2_legacy.yml
---

import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'

Sends a reset request to an email address.

```js
const { error, data } = await supabase.auth.resetPasswordForEmail(email, options: {
  redirectTo: 'https://example.com/update-password',
})
```

## Parameters

<ul className="method-list-group">
  
<li className="method-list-item">
  <h4 className="method-list-item-label">
    <span className="method-list-item-label-name">
      email
    </span>
    <span className="method-list-item-label-badge required">
      required
    </span>
    <span className="method-list-item-validation">
      <code>string</code>
    </span>
  </h4>
  <div class="method-list-item-description">

The email address of the user.

  </div>
  
</li>

<li className="method-list-item">
  <h4 className="method-list-item-label">
    <span className="method-list-item-label-name">
      options
    </span>
    <span className="method-list-item-label-badge required">
      required
    </span>
    <span className="method-list-item-validation">
      <code>object</code>
    </span>
  </h4>
  <div class="method-list-item-description">

No description provided.

  </div>
  
<ul className="method-list-group">
  <h5 class="method-list-title method-list-title-isChild expanded">Properties</h5>

<li className="method-list-item">
  <h4 className="method-list-item-label">
    <span className="method-list-item-label-name">
      captchaToken
    </span>
    <span className="method-list-item-label-badge false">
      optional
    </span>
    <span className="method-list-item-validation">
      <code>string</code>
    </span>
  </h4>
  <div class="method-list-item-description">

Verification token received when the user completes the captcha on the site.

  </div>
  
</li>

<li className="method-list-item">
  <h4 className="method-list-item-label">
    <span className="method-list-item-label-name">
      redirectTo
    </span>
    <span className="method-list-item-label-badge false">
      optional
    </span>
    <span className="method-list-item-validation">
      <code>string</code>
    </span>
  </h4>
  <div class="method-list-item-description">

A URL to send the user to after they are confirmed.

  </div>
  
</li>

</ul>

</li>

</ul>

## Notes

Sends a reset request to an email address.

When the user clicks the reset link in the email they will be forwarded to the site url or the redirect url specified:

`<SITE_URL>#access_token=x&refresh_token=y&expires_in=z&token_type=bearer&type=recovery`

Your app must detect `type=recovery` in the fragment and display a password reset form to the user.

You should then use the access_token in the url and new password to update the user as follows:

```js
const { error, data } = await supabase.auth.updateUser({
  password: new_password,
})
```

## Examples

### Reset password

```js
const { error, data } = await supabase.auth.resetPasswordForEmail(email, options: {
  redirectTo: 'https://example.com/update-password',
})
```
