Skip to main content

Session management

Session management controls how long a user's authentication session stays valid before they must re-authenticate.

Session management settings

Configure session duration

Navigate to Project SettingsAdvancedSession management and enter a value in the Session Duration field.

Supported units:

UnitExamples
Seconds1s, 30s
Minutes1m, 30m
Hours1h, 12h, 24h
Days1d, 7d, 30d

Default: 1d | Minimum: 1s | Maximum: 30d

When the session expires, web3auth.connected becomes false and all provider calls fail until the user re-authenticates.

Choosing a session duration

Shorter durations reduce the exposure window if a session token is compromised. Longer durations reduce re-authentication friction.

Common configurations:

  • High-security or financial apps: 30m4h
  • Standard web apps: 1d7d
  • Mobile or gaming apps: 14d30d

Next steps