Forum Discussion

zcutlip's avatar
zcutlip
Dedicated Contributor
3 years ago

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

  • andi_t_1P's avatar
    andi_t_1P
    Icon for 1Password Team rank1Password Team

    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.

  • zcutlip's avatar
    zcutlip
    Dedicated Contributor

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

  • andi_t_1P's avatar
    andi_t_1P
    Icon for 1Password Team rank1Password Team

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

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