Session is on tabs scope. How can i keep the session between tabs?

prrrcl
prrrcl
Community Member

Steps to reproduce

  • Install CLI with brew
  • sign in with eval $(op signin)
  • Open new tab in a terminal, run op whoami

What happened?

When I follow the steps that I described, I get the following error:
[ERROR] 2022/06/29 08:17:29 could not find session token for account <myacount>

 What did you expect to happen?

Keep session between tabs


1Password Version: 7.9.5
Extension Version: Not Provided
OS Version: macOs 12.4
Browser:_ Not Provided

Comments

  • Hey @prrrcl , thank you for reaching out to us!

    The CLI has been designed in this way in order to make sure the authentication is scoped exclusively to where the user has made the explicit choice to sign in. Had it been scoped globally, a malicious process, present in your system, could use the session token to access your 1Password secrets.

    If you really want to use the same token between different tabs, you could use op signin --raw to produce a session token, and then export it in the scope of any environment (i.e. terminal tabs, in your case) where you want to use the account.

    This being said, have you heard of biometric authentication, which came with the release of CLI 2.0?
    https://developer.1password.com/docs/cli/get-started#sign-in

    This offers a much improved user experience in terms of the signing in workflow. We'd love to hear your thoughts about that!

    Thanks,
    Horia

This discussion has been closed.