Skip to content

Release 3 follow-up: activate canonical production reset-email delivery #200

Description

@support371

Objective

Complete the final operational gap in Release 3 by activating canonical password-reset email delivery for the production Vercel project support371-gem-enterprise.

Verified production state

  • Production deployment: dpl_4ZtNKaskxFELrYdNFFBE4NXinRfu
  • Production SHA: 8eee118d5c815fbb04ddc0370df3a801761a9e80
  • Git branch: main
  • /api/auth/recovery-readiness returns 200 and confirms the canonical GEM reset origin, URL-fragment token transport, database-trigger session revocation, gateway recovery disabled, and legacy gateway sessions rejected.
  • The same endpoint currently reports emailDeliveryConfigured: false.
  • Production error/fatal runtime logs were empty for the inspected 24-hour period.

Current blocker

src/lib/mail/send.ts requires all four of the following production variables:

  • SMTP_HOST
  • SMTP_PORT
  • SMTP_USER
  • SMTP_PASS

The canonical forgot-password route intentionally fails closed with 503 until those variables exist.

A historical Twilio SendGrid API key associated with the account was deleted by SendGrid after public exposure. It must never be reused. Provision a new restricted credential and keep it only in the Vercel encrypted environment.

Legacy recovery retirement completed

The obsolete Supabase gem-password-recovery function was replaced in production with version 10. It remains JWT-protected and now returns 410 RECOVERY_GATEWAY_DISABLED, with the only recovery URL set to:

https://www.gemcybersecurityassist.com/forgot-password

The retired function can no longer create tokens, send email, mutate passwords, or direct users to the prior external recovery page.

Required configuration

Configure the following only in the Vercel Production environment for project support371-gem-enterprise:

  • SMTP_HOST
  • SMTP_PORT
  • SMTP_USER
  • SMTP_PASS
  • SMTP_SECURE
  • SMTP_FROM=GEM Enterprise <no-reply@gemcybersecurityassist.com>
  • REPLY_TO_EMAIL=admin@gemcybersecurityassist.com
  • NEXT_PUBLIC_APP_URL=https://www.gemcybersecurityassist.com

The sending domain/address must be verified with the chosen provider before live testing.

Acceptance criteria

  • A new restricted mail-provider credential is created; no historical or exposed credential is reused.
  • Sender/domain verification passes for gemcybersecurityassist.com.
  • Vercel Production receives the required encrypted variables.
  • A new production deployment from current main reaches READY.
  • /api/auth/recovery-readiness reports emailDeliveryConfigured: true.
  • Unknown-email recovery remains non-enumerating.
  • One controlled recovery request for admin@gemcybersecurityassist.com is accepted by the provider and delivers a canonical GEM reset link.
  • The reset link uses https://www.gemcybersecurityassist.com/reset-password#token=... and expires after 15 minutes.
  • No password is changed during delivery validation.
  • Production error/fatal runtime logs remain clean.
  • Supabase sessionVersion, password-change revocation triggers, and revoked direct trigger-function privileges remain intact.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions