op signout command of the CLI is completely broken. It is impossible to sign out of an account, you must wait for the token to expire. While the token is still valid, the
op signout command does nothing and it is consequently impossible to use the
op account forget command. Using the
--forget flag on the
op signout command also does nothing.
1) Add an account using
op account add.
2) Sign in to this account using
3) Attempt to sign out and forget the account by using
op signout, then
op account forget [account]. It will say that you are currently logged in.
4) Attempt to sign out and forget the account by using
op signout --account [account] --forget, then use
op account forget [account]. It will say that you are currently logged in. Account can be confirmed as still remembered by using
op account list.
As it stands, the only two workarounds are 1) by going to website and forgetting the device there, therefore forcing a sign out the next time the CLI runs, or 2) using
op signout --all, which effectively forces a sign out of all accounts, which is proven by the fact that the
op account forget [account] command then works correctly and the account is no longer listed by the
op account list command.
This is a longstanding issue as it has been mentioned in various forms here:
Tested using 1Password CLI Version: 2.6.2