---
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
## 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:
`#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',
})
```