Skip to content

Authentication profiles: durable login state across restarts #155

Description

@SarthakWade

Problem

Normal sessions share browser state, but persistence is not equivalent across engines. WKWebView uses persistent website storage, while Linux places Chromium's profile under the runtime directory. Linux login state therefore lacks a durable cross-reboot contract.

Proposed contract

Define a normal-profile storage location and lifecycle for both engines. Cookies and storage should survive host and machine restarts until the user clears them, logs out, or chooses a nonpersistent context.

Linux should use an XDG data location with a private directory, atomic setup, migration from the current runtime profile where safe, single-owner locking, and corruption recovery. macOS behavior should be made explicit and tested rather than relying on an implicit default.

Boundaries

Profile directories remain per-user and inaccessible to other users. No cookie import or unrestricted profile-path option is introduced. Sensitive diagnostics remain double-gated. Private contexts are handled by #35 and must never inherit normal profile state.

This changes persistence behavior and requires an architecture-decision entry.

Acceptance criteria

  • The persistence and cleanup contract is documented for both engines.
  • Linux profile permissions, locking, migration, and failure modes are tested.
  • Login cookies survive controlled host restart tests on macOS and Linux.
  • Logout and explicit clear operations remove the expected state.
  • Concurrent hosts cannot silently corrupt or share one profile.
  • Existing session-sharing documentation is corrected and E2E suites pass.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:linux-hostChromium host (LinuxHost/, CDP)area:macos-hostWKWebView host (main.swift, Host/)priority:highBlocks a roadmap phasestatus:needs-designRequires an architecture-decision entry firsttype:featureNew capability or commandtype:securitySecurity boundary or hardening

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions