DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsAuthenticationPassword Reset
Introduction
Getting Started
Authentication
RegisterLogin / LogoutPassword ResetProfile Management
Products
Categories
Cart
Checkout
Blog
Reviews
Webhooks
Customers
Orders
Inventory
Shipping
Discounts
Affiliates
Email
Media & Files
Analytics & Tracking
Locations
Tax
Global Data
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
Site Keys & Client Sites
Use Cases
Operations

Password Reset

Request and process password resets.

Updated March 29, 2026

On this page
  • Overview
  • Request Password Reset
  • Reset the Password
  • REST API Endpoints
  • Request Body — Forgot Password
  • Request Body — Reset Password
  • Example Reset Form
  • Alternative: OTP Login
  • Next Steps

Overview

Customers who have set a password can reset it if forgotten. The flow uses a secure OTP code sent to their email address.

Request Password Reset

Send a reset code to the customer's email:

typescript
import dash from "@/lib/dash"

await dash.auth.requestPasswordReset("customer@example.com")
// An OTP code is sent to the email
Note: This endpoint always returns success, even if the email doesn't exist. This prevents email enumeration attacks.

Reset the Password

After the customer enters the code and a new password:

typescript
await dash.auth.resetPassword({
  email: "customer@example.com",
  code: "592038",
  password: "newSecurePassword456!",
})
// Password is updated — customer can now log in with the new password

REST API Endpoints

ActionMethodEndpoint
Request ResetPOST/storefront/auth/forgot-password
Reset PasswordPOST/storefront/auth/reset-password

Request Body — Forgot Password

json
{
  "email": "customer@example.com"
}

Request Body — Reset Password

json
{
  "email": "customer@example.com",
  "token": "592038",
  "new_password": "newSecurePassword456!"
}

Example Reset Form

typescript
"use client"
import { useState } from "react"
import dash from "@/lib/dash"

export function ResetPasswordForm() {
  const [step, setStep] = useState<"email" | "code">("email")
  const [email, setEmail] = useState("")

  async function requestReset() {
    await dash.auth.requestPasswordReset(email)
    setStep("code")
  }

  async function submitReset(code: string, password: string) {
    await dash.auth.resetPassword({ email, code, password })
    // Redirect to login
  }

  // ... render form based on step
}

Alternative: OTP Login

Customers can always bypass password reset entirely by using OTP login. If a customer forgets their password, they can simply request an OTP to log in and then set a new password from their account.

Next Steps

  • Login / Logout — All login methods
  • Profile Management — Update profile after logging in
PreviousLogin / LogoutNextProfile Management

On this page

  • Overview
  • Request Password Reset
  • Reset the Password
  • REST API Endpoints
  • Request Body — Forgot Password
  • Request Body — Reset Password
  • Example Reset Form
  • Alternative: OTP Login
  • Next Steps