> ## Documentation Index
> Fetch the complete documentation index at: https://docs.younegotiate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Forgot & Reset Password

> An EcoMail Hub user requests a reset link and creates a new password.

## Real-World Example

Maya forgets her EcoMail Hub / EcoPortal password. She requests a reset link using her registered email address, opens the reset link, enters a new confirmed password, and returns to login.

## Visual Flow

```mermaid placement="top-right" actions={true} theme={"system"}
flowchart TD
    A["User enters registered email"] --> B["Portal validates email and reCAPTCHA"]
    B --> C{"Request allowed?"}
    C -->|No| D["Show validation or throttle error"]
    C -->|Yes| E["Send reset link through EcoMail Hub password broker"]
    E --> F["User submits new confirmed password"]
    F --> G["Password is updated and user returns to login"]
    classDef default fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef actor fill:#E0F2FE,stroke:#0284C7,stroke-width:2px,color:#0C4A6E;
    classDef system fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef decision fill:#FEF3C7,stroke:#D97706,stroke-width:2px,color:#78350F;
    classDef risk fill:#FEE2E2,stroke:#DC2626,stroke-width:2px,color:#7F1D1D;
    classDef outcome fill:#DCFCE7,stroke:#16A34A,stroke-width:2px,color:#14532D;
    class A,F actor;
    class B,E system;
    class C decision;
    class D risk;
    class G outcome;
    linkStyle default stroke:#94A3B8,stroke-width:2px;
```

## How It Should Work

* It should use the EcoMail Hub / EcoPortal password broker.
* It should throttle repeated reset-link requests.
* It should require a valid reset token, email, password, and confirmation.
* It should redirect the user back to login after a successful reset.

## How It Should Not Work

* It should not reset a creditor, consumer, or Super Admin password.
* It should not allow unlimited reset requests from the same email/IP pair.
* It should not accept weak or unconfirmed passwords.

## Developer Notes

* Forgot password stores the entered email so the reset request flow can stay smooth.
* Reset password hashes the new password and rotates the remember token.

## Related App Areas

* `routes/ecomailhub/auth.php`
* `app/Livewire/ConsumerResponseManager/Auth/ForgotPasswordPage.php`
* `app/Livewire/ConsumerResponseManager/Auth/ResetPasswordPage.php`
* `app/Livewire/ConsumerResponseManager/Forms/ForgotPasswordForm.php`
* `app/Livewire/ConsumerResponseManager/Forms/ResetPasswordForm.php`
