Signing back into the Community for the first time? You'll need to reset your password to access your account. Find out more.
Forum Discussion
Former Member
3 years agoop login --refresh option to sign in only if not currently signed in?
I use the new 1password CLI (which is great!) heavily in shell scripts an aliases, to help me keep sensitive information out of my command-line history file, off the screen, away from possible clipbo...
Former Member
3 years agoThanks @"Horia.Culea_1P"
It looks like the "biometric" CLI integration partly meets this need, and the "op whoami" command helps too.
The alias can now be
if op whoami --account $MYACC &>/dev/null; then echo "already signed in to account $MYACC"; else eval $(op signin --account $MYACC); fi
Enabling https://developer.1password.com/docs/cli/about-biometric-unlock/ seems to let "op signin" re-use a recently validated set of credentials within the same session, too. It still does a new login, but doesn't prompt for a password a second time.
For other readers, note that despite the name the "biometric" signin option is really "operating system keyring unlock for my 1password CLI" - it will happily use a password if that's what your OS is configured to use to unlock your OS keyring.