Files
jmap-webmail/.env.example
T
Matthieu MALVACHE 6a49514f7a feat(auth): add "Remember me" session persistence and simplify 2FA UX
Basic Auth sessions now persist across page refreshes via an encrypted
httpOnly cookie (AES-256-GCM). The feature is opt-in: admin sets
SESSION_SECRET env var, user checks "Remember me" at login.

Rework the 2FA input from a checkbox+animated panel to a discreet
"I have a 2FA code" text link that reveals the TOTP field on click.
2026-02-26 00:45:26 +01:00

73 lines
2.8 KiB
Bash

# JMAP Webmail Configuration
# Copy this file to .env.local and fill in your values
# =============================================================================
# Runtime Configuration (recommended for Docker)
# These are read at request time, allowing post-build configuration
# =============================================================================
# App name displayed in the UI
APP_NAME=JMAP Webmail
# JMAP server URL (required)
# This is the URL of your JMAP-compatible mail server
# Make sure your JMAP server allows CORS requests from this webmail's domain.
JMAP_SERVER_URL=https://your-jmap-server.com
# =============================================================================
# Build-time Configuration (legacy, still supported as fallback)
# These are baked into the bundle at build time
# =============================================================================
# NEXT_PUBLIC_APP_NAME=JMAP Webmail
# NEXT_PUBLIC_JMAP_SERVER_URL=https://your-jmap-server.com
# =============================================================================
# OAuth2/OIDC Configuration (optional)
# Enable SSO login via OAuth2 with PKCE. Basic Auth remains the default.
# =============================================================================
# Set to "true" to enable the SSO login button
# OAUTH_ENABLED=true
# OAuth2 client ID registered with your JMAP server
# OAUTH_CLIENT_ID=webmail
# OAuth2 client secret (kept server-side, never sent to browser)
# OAUTH_CLIENT_SECRET=
# Explicit OAuth2/OIDC issuer URL (optional)
# When set, OAuth discovery (.well-known endpoints) targets this URL instead of
# JMAP_SERVER_URL. Use this when authentication is handled by an external IdP
# (e.g., Keycloak, Authentik) rather than the JMAP server itself.
# If not set, discovery falls back to JMAP_SERVER_URL.
# OAUTH_ISSUER_URL=https://keycloak.example.com/realms/mail
# =============================================================================
# Session Persistence (optional)
# Enables "Remember me" for Basic Auth login.
# Generate with: openssl rand -base64 32
# =============================================================================
# SESSION_SECRET=your-secret-key-here
# =============================================================================
# Logging Configuration
# =============================================================================
# Log format: "text" (colored, human-readable) or "json" (structured, for log aggregation)
LOG_FORMAT=text
# Log level: "error", "warn", "info", or "debug"
LOG_LEVEL=info
# =============================================================================
# Docker Configuration
# =============================================================================
# When running with Docker, set these in .env.local:
# APP_NAME=My Webmail
# JMAP_SERVER_URL=https://mail.example.com
#
# Then run:
# docker compose up -d