Skip to content

chainabit auth logout ​

Sign out of the credential in use (or the one named) and invalidate its server session.

Synopsis ​

text
chainabit auth logout [options]

Options ​

OptionDescriptionDefault
--api-keyRemove the saved Chainabit API key only; the Subscription sign-in stays—
--subscriptionSign out of the Subscription session only; a saved API key stays—
--allRemove both the API key and the Subscription sign-in—

Options shared by every command are described in Global options and shared behavior.

Behavior ​

Removes the stored credentials and the saved default workspace, and ends the session on the server. Run chainabit workspace use again after signing in. If the server cannot be reached, the local credentials are still removed and the command reports that the server session could not be revoked. If CHAINABIT_TOKEN is set, only the stored credentials are removed; the token in the environment is not revoked. A developer token is not revoked by logout; revoke it separately.

Output ​

Text output states whether the server session was revoked. With --json, the output contains the booleans success, localCredentialsRemoved and serverSessionRevoked. The exit code is 0 in all of these cases, including when the server could not be reached.

Examples ​

bash
chainabit auth logout
chainabit --json auth logout

Built with purpose. chainabit.com