op signin not idempotent

nsushkin
nsushkin
Community Member

In Linux, with the 2.30.0 CLI, I keep running eval $(op signin) and it keeps prompting for my passphrase every time.


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Linux
Browser: Not Provided

Comments

  • nsushkin
    nsushkin
    Community Member

    You have to pass the session token via --session argument for eval $(op signin) to be idempotent
    ``

  • celliso1
    celliso1
    Community Member
    edited December 3

    This needs further explanation in the documentation and the CLI help:

    --session token Authenticate with this session token. 1Password CLI outputs session tokens for successful 'op signin' commands when 1Password app integration is not enabled.

    Does the same token work forever?

    Is it safe to save the session token in plaintext, i.e. ~/.profile?

    I am using Windows 11 WSL, and the integration does not seem to work with either the Windows or Linux Desktop version. My users are complaining that they have to enter the password in each new terminal window. Saving the session token to .profile prevents this, but feels unsafe.