Skip to content
This repository was archived by the owner on Apr 14, 2025. It is now read-only.
This repository was archived by the owner on Apr 14, 2025. It is now read-only.

The CLI asks for 2FA on Every Launch #9

Description

@dale-courtney

I love using this program. However, when 2FA is turned on, the script crashes.

When running the OnePassword Python wrapper, I'm getting an error, requesting the 6-digit authentication code
from onepassword import OnePassword from api_keys import one_password as secret import json op = OnePassword(secret=secret)

I get the following error:

onepassword.SigninFailure: Error signing in: 'Enter your six-digit authentication code: [ERROR] 2021/04/20 06:41:51 incorrect One-Time Password length. expected 6'

According to the 1Password team,

When you use the CLI without the wrapper, it remembers your account (after the first time you sign in) so you don't need to provide it with your Secret Key or organization address. You can also sign in using a shortname. For example: op signing personal and it will only ask for your Master Password.
I think what happens here is that every time you run the wrapper you are starting a brand new login session (e.g. it doesn't remember your credentials like when you sign in without the wrapper) so it asks you for your 2FA code every time. If you can get it to use a shortname to signin so you won't require the Secret Key and domain, that might do the trick. Perhaps this will help: https://support.1password.com/command-line-reference/#signin

Thanks for considering updating this. I have turned 2FA back on and am not using the script for now.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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