Commit Graph
4 Commits
Author SHA1 Message Date
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
Matthieu MALVACHE 2f20aa835b feat(auth): add RP-initiated logout and OAuth unit tests
Logout now revokes the refresh token and redirects to the IdP's
end_session_endpoint so the SSO session is fully terminated. The
end_session_url is validated server-side (HTTPS only) before being
returned to the client, preventing open redirect attacks.

Also adds 14 unit tests covering PKCE (including RFC 7636 test vector)
and OAuth discovery (fallback, caching, required field validation).
2026-02-26 00:07:38 +01:00
Matthieu MALVACHE d235403d4c feat(auth): add explicit OAuth issuer URL and improve discovery diagnostics
Support external IdPs (Keycloak, Authentik) that handle auth separately
from the JMAP server via OAUTH_ISSUER_URL. Also surfaces discovery
failures with logged errors and a visible warning banner instead of
silently hiding the SSO button.
2026-02-25 23:38:27 +01:00
Matthieu MALVACHE 2ae0520026 feat(auth): add OAuth2/OIDC with PKCE for SSO login
Add OAuth2 authorization code flow with PKCE as an alternative to
basic auth. Supports Stalwart's built-in OAuth provider with automatic
token refresh, session persistence via httpOnly cookies, and graceful
fallback to basic auth when OAuth is not configured.
2026-02-25 16:04:17 +01:00