Skip to main content
June 4, 2024
Question

After upgrading to op2, I'm getting an error with signin

  • June 4, 2024
  • 3 replies
  • 125 views

For some time now we've been able to login successfully with:

op signin {domain} {email} {key} --raw --shorthand {email};

However, after upgrade to op version 2 we are getting the error:

unknown flag: --shorthand

From docs it seems that for shorthand we can use any string?


1Password Version: 2.24.0
Extension Version: Not Provided
OS Version: macOS 14.5
Browser: Not Provided

3 replies

1P_Tommy
1Password Employee
June 11, 2024

Hi @LuisG! 👋

The sign-in flow for 1Password CLI 2 works differently than version 1. In version 2, op signin signs you in to 1Password CLI using the 1Password desktop app integration. This allows you to use biometric unlock with the CLI.

If you still want to use a manual authentication flow like in version 1, this article explains how to do that. You can set a shorthand for an account with op account add --shorthand <shorthand> then sign in with the following command:


eval $(op signin --account <shorthand>)

Let me know if that helps!

Also, could I ask what documentation you were referring to? I'd love to update the docs to make this more clear.

LuisGAuthor
June 11, 2024

Hi @1P_Tommy

That was it, thanks.
I was trying to login on v2 with outdated code.

I don't remember how I got to the documentation, I guess by googling (but it was the official 1password docs). I must've not seen that the docs were for v1 (Although I do remember thinking it was important to check if it was for v1, or v2; and I couldn't easily find it)

1P_Tommy
1Password Employee
June 12, 2024

Thanks. I'm glad to hear things are working better for you.