Skip to content

mocactl: --profile, so one machine can hold more than one login #404

Open

Description

@pdettori

Found preparing the VM demo B runbook (#367, PR #403, fix-list item 3).

Problem

mocactl caches one identity per config directory: $XDG_CONFIG_HOME/mocactl/auth.json (packages/mocactl/src/config.ts:23-29). A second mocactl login in the same directory silently replaces the first. Two users rehearsing on one laptop, or one person holding two accounts (a user and an admin), must juggle XDG_CONFIG_HOME by hand. Forgetting to do so is indistinguishable from a working login as the wrong subject.

Proposal

  • A --profile NAME flag (and a MOCACTL_PROFILE env var) selecting mocactl/profiles/NAME/{auth,config}.json. The default profile stays where it is today.
  • doctor's "logged in" check names the subject and the profile, so the wrong one is visible.

Not on the critical path

The XDG_CONFIG_HOME workaround is documented in docs/demos/vm-two-user-acceptance.md (Act 0b), and the demo runs on two laptops anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions