Forum Discussion

Nazul's avatar
Nazul
Occasional Contributor
2 years ago

op signin not idempotent (Windows)

There's already another similar thread but for Linux. Since I'm using Windows and when I use op signin or op read I get a dialog where it asks me to unlock or authenticate using Windows Hello (PIN), probably it could be a different scenario or issue.

Nevertheless, the outcome is the same. I use op signin and looks like it worked but then I use op whoami and it says I'm not (ERROR account is not signed in). Every single time I use op read I need to authenticate using Windows Hello. Having a script with multiple values to be retrieved causes multiple prompts.

I'm new with 1Password CLI. Read I could use op signin --raw to get the token and add it to an environment variable, but that command returns nothing.

I tried both by using an elevated prompt and a standard prompt. Same result.

Am I missing something?


1Password Version: 1Password for Windows 8.10.48 (81048017)
Extension Version: CLI 2.30.0
OS Version: Windows 11 24H2
Browser: Not Provided

4 Replies

  • Nazul's avatar
    Nazul
    Occasional Contributor

    Setting OP_BIOMETRIC_UNLOCK_ENABLED helped me until it was quite a challenge to signin entering my password frequently.

    This never really worked for me so I stopped using it. From time to time, I tried when new op versions were released... until I realized that I installed it using Chocolatey and the official install method for Windows is using WinGet. So I tried this way and it's all good!

    For everyone else having issues with 1Password CLI on Windows, try using WinGet to install it and avoid installing from Chocolatey. Probably this will avoid you some trouble.

     

  • Nazul's avatar
    Nazul
    Occasional Contributor

    Thank you. However, the first two πŸŽ‰ should go to the OP of the thread I found for Linux I was referring to.

    https://1password.community/discussion/148508/op-signin-not-idempotent

  • RogueScholar's avatar
    RogueScholar
    Occasional Contributor

    One πŸŽ‰ awarded for referencing the concept of idempotency, plus a bonus πŸŽ‰ for working it into the title. Seriously, too few people are even aware that it's a big deal, particularly for unattended operations.

    Adding a rare third πŸŽ‰ for sharing the existence of an environment variable behavior switch that wasn't in the documentation the last time I read it. You rock! πŸ‘

  • Nazul's avatar
    Nazul
    Occasional Contributor

    I just found out that if I use OP_BIOMETRIC_UNLOCK_ENABLED environment variable set to false, it asked me to add my account again, and then I was able to use op signin as expected.