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

# Session Duration

> Control how long a verified session lasts.

Once a visitor completes verification, Veriox issues them a session. This lets them browse your site without being prompted to verify again until the session expires.

## Choosing a session length

| Duration           | Good for                                                    |
| ------------------ | ----------------------------------------------------------- |
| 1 hour             | High-security or compliance-sensitive use cases             |
| 24 hours (default) | Most sites — balances convenience and recency               |
| 7 days             | Low-friction experience for returning visitors              |
| 30 days            | Minimal re-verification, best for loyal returning audiences |

**Shorter sessions** mean visitors verify more often — higher verification count and cost, but more recent proof of age.

**Longer sessions** reduce friction and lower your verification count, but the proof of age is less recent.

For most use cases, 24 hours is the right default.

## Setting session duration in the portal

Go to your worker in [portal.veriox.io](https://portal.veriox.io) → **Configuration** → **Session Duration** and choose from the available options. Save and the change applies to new sessions immediately.

<Info>
  Existing sessions are not affected when you change this setting — they will expire at their original time.
</Info>

## How the session works

Veriox stores the session as a cookie on your domain. It is:

* **Signed** — tamper-proof, validated by the worker on every request
* **HttpOnly** — not accessible to JavaScript on the page
* **Secure** — only sent over HTTPS
* **SameSite=Lax** — protected against cross-site request forgery

The cookie is scoped to your domain only and does not track visitors across other sites.

<Info>
  Session duration is a portal setting, not a worker variable — there's nothing to set in `wrangler.toml` and no redeploy is needed, whether you installed via the dashboard or Wrangler.
</Info>
