Skip to content

macOS: Credential decryption always fails - OS Keyring not storing encryption key #360

@jamesg546

Description

@jamesg546

Description

gws auth login completes successfully and reports encrypted credentials saved, but all subsequent commands fail with:

Authentication failed: Failed to decrypt credentials: Decryption failed. Credentials may have been created on a different machine.

This happens consistently, including when running gws auth login and subsequent commands from the same terminal session.

Environment

  • macOS Sequoia (Darwin 25.3.0)
  • gws 0.9.1
  • Apple Silicon (M-series)
  • zsh shell

Steps to Reproduce

  1. gws auth setup (or manually configure OAuth client)
  2. gws auth login → completes successfully, browser OAuth flow works
  3. gws drive files list --params '{"pageSize": 3}' → fails with decryption error
  4. gws auth export → also fails with same error

Investigation

  • No keychain entries found for gws via security find-generic-password or security dump-keychain
  • The Rust keyring crate appears to not be writing to macOS Keychain
  • Created .encryption_key file in ~/.config/gws/ as mentioned in the status output ("OS Keyring or local .encryption_key") — still fails
  • GWS_STORAGE=plain env var has no effect
  • gws auth status confirms encryption_valid: false

Expected Behavior

Either:

  1. OS Keyring integration should work on macOS, or
  2. The .encryption_key fallback should be functional, or
  3. A --no-encrypt / plain storage option should be available

Workaround

None found. The tool is currently unusable on macOS.

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