> ## 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.

# Verify Email

> Process for verifying a user's email address after registration in the Creditor Portal.

```mermaid placement="top-right" actions={true} theme={"system"}
flowchart TD
    A["User Clicks Verification Link"]
    A --> B["System Validates Link"]

    B --> C{"Link Valid?"}
    C -->|No| D["Show Verification Error"]
    C -->|Yes| E["Email Marked as Verified"]

    E --> F["Route User Based on Account Status"]

    classDef process fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef decision fill:#FEF3C7,stroke:#D97706,stroke-width:2px,color:#78350F;
    classDef error fill:#FEE2E2,stroke:#DC2626,stroke-width:2px,color:#7F1D1D;
    classDef outcome fill:#DCFCE7,stroke:#16A34A,stroke-width:2px,color:#14532D;

    class A,B,E process;
    class C decision;
    class D error;
    class F outcome;
```

## Purpose

Confirms the user's email address and activates the account.

## How It Works

* User receives verification email
* User clicks verification link
* System validates link
* Email is marked verified

## Result

* Account is activated
* User can log in
* User is routed based on onboarding status

## Validation Rules

* Link must be valid and not expired
* Email must match registered account

## Failure Scenarios

* Invalid link
* Expired link
* Email not found

## Developer Notes

* Use signed, time-limited verification tokens
* Token must map to the correct user
* Expiration handling required
* Verification should be idempotent
* Update user status to verified
