Skip to content

Keyring token caching fails on macOS - tokens don't persist between commands #10

@amandacdillon

Description

@amandacdillon

Problem

When running eightctl on macOS, the keyring token caching doesn't work correctly. Tokens are reported as "saved" but cannot be read back on subsequent commands, causing fresh login attempts each time.

Steps to Reproduce

  1. Run eightctl status --verbose
  2. Observe logs show:
    • keyring get failed error="The specified item could not be found in the keyring"
    • authenticating with server
    • keyring saved token
  3. Run eightctl status --verbose again
  4. Same "keyring get failed" appears - token was not actually persisted

Expected Behavior

After first successful auth, token should be cached and reused on subsequent commands.

Actual Behavior

Every command triggers a fresh login, quickly hitting Eight Sleep's rate limits (429 Too Many Requests).

Environment

  • macOS (arm64)
  • eightctl version: 0.1.0-dev
  • Keychain access was approved when prompted

Workaround

Currently none - users hit rate limits quickly when running multiple commands.

Suggestion

Consider adding file-based token caching as a fallback (e.g., ~/.config/eightctl/token.json) when keyring access fails, similar to how many other CLI tools handle this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions