Skip to main content
zcutlip
Sep 6, 2022 10:59 PM UTC
Question

Verify signed-in session without biometric prompt

Is there a way to verify if there's a valid signed-in session without popping the biometric dialogue if not?

I'm trying to support a flow in pyonepassword where the caller tells me they expect to have valid session (set via environment variable) and that I should verify that, but have it be a hard failure if not.

If I disable biometric and do something like:

op user get --me

...then it does fail because I need to first do op signin. But if biometric is enabled, any query that hits the account pops a TouchID dialogue even without first doing op signin.

Is there a query that will hard fail, or a way (option, env variable, etc.) to say "if not signed in, please don't offer biometric prompt and fail instead"

3 replies

1Password Employee
Sep 8, 2022 10:03 AM UTC

Hi @zcutlip , I believe op whoami should fit this use case.

Let me know if you have further questions. Best,
Andi

zcutlip
zcutlipAuthor
Sep 8, 2022 6:55 PM UTC

Awesome, thanks! I'm in the process of migrating pyonpassword over to it now. Looking forward to it working with service accounts.

1Password Employee
Sep 9, 2022 3:58 PM UTC

Glad I could help, op whoami will soon work with Service Accounts as well, since the issue has been identified on why it wasn't already.