Prompt

How do I send a password reset email from a backend API?

Technology / API Platforms14 observationsLast seen Oct 5, 2026

Latest observation

Oct 5, 2026ChatGPT

A secure password-reset flow usually looks like this:

  1. User requests reset POST /auth/forgot-password
{ "email": "user@example.com" }
  1. Backend generates a random, single-use token
  • Use a cryptographically secure random generator.
  • Store a hash of the token in your database, not the raw token.
  • Give it a short expiration, e.g. 15–30 minutes.
  • Invalidate previous reset tokens.
  1. Send the email Include a link such as: https://yourapp.com/reset-password?token=<token>
  2. User submits a new password POST /auth/reset-password
{
  "token": "...",
  "password": "new-password"
}
  1. Backend validates the token Check that it exists, hasn't expired, and hasn't been used. Then hash the new password with Argon2id or bcrypt and update the account.
  2. Invalidate the token and existing sessions This prevents the reset link from being reused.

Important security details

  • Return the same response whether the email exists or not, e.g. “If an account exists, we sent a reset email.” This prevents account enumeration.
  • Rate-limit reset requests by IP and account/email.
  • Don't put the user's password or other sensitive data in the URL.
  • Don't log reset tokens.
  • Use HTTPS.
  • Consider invalidating all active sessions after a successful password reset.

For the email provider, your backend can call an email API such as Resend, SendGrid, or Amazon SES. The basic architecture is:

Browser
   │
   │ POST /forgot-password
   ▼
Backend ── generate token ──► Database
   │
   │ send email
   ▼
Email provider
   │
   ▼
User clicks reset link
   │
   ▼
Backend ── validate token ──► Database
   │
   └── hash new password + invalidate token

If you tell me your backend stack (e.g. Node/Express, Python/FastAPI, Django, Laravel, Rails, Go, or Java/Spring), I can give you a complete implementation.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (14 observations for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.