logout
Sign a profile out. celigo logout revokes the profile's OAuth session at the authorization server — its refresh token and its access token — and removes the session from ~/.celigo/config.json. The profile keeps its other settings and its environment binding, and holds no credential until you sign in again with celigo login.
logout manages local credentials, so it is never mode-gated.
Added in celigo-cli 2026.10.1.
REST API: Authentication
celigo logout [flags]Supports all global flags.
celigo logout
Revoke and forget the OAuth session of the selected profile — --profile, else CELIGO_PROFILE, else the active profile.
Signature
celigo logoutArguments
None.
Flags
Uses global flags only.
Example
celigo logout # the active profile
celigo logout --profile acme-corp-sandbox # a named profileCorresponds to: the OAuth token revocation endpoint the issuer's metadata advertises — once for the refresh token, then once for the access token. No /v1 API request is made.
What logout reports
A revocation it could not make. The issuer unreachable, a token its endpoint refused, or no revocation endpoint in the issuer's metadata is said on stderr. The profile is signed out on this machine either way, and any token not revoked stays valid on the server until it expires:
Other sign-ins the revocation may have ended. Sign-ins made from the same browser session share one OAuth grant on the platform, and revoking one session's refresh token revokes the grant. After the sign-out,
logoutnames the other signed-in profiles at the same issuer or bound to the same environment, on stderr; they needceligo loginagain if the grant was theirs too:A profile that does not exist. A misspelled
--profileorCELIGO_PROFILEfails, exit1, instead of reporting a sign-out that never happened:Profile 'acme-corp-prod' does not exist. Available: acme-corp-production, acme-corp-sandbox (run 'celigo profile list').A profile that is not signed in.
Profile 'acme-sandbox' is not logged in.(exit0).logoutremoves an OAuth session only; to clear a profile's API token, runceligo config unset api_token.A session block the CLI cannot read — one left by a hand edit or an older build, missing its access token, client id, or issuer.
logoutremoves it, says so, and revokes nothing, since the block holds nothing it could revoke:
Commands running in parallel
The revocation and the removal run as one step under the session lock (~/.celigo/oauth.lock), so no renewal can swap the tokens in between and leave the new ones live on the server. A celigo command renewing the same session in another terminal finishes first, and the tokens it stored are the ones revoked. A command that has to renew the session after the sign-out fails at once, without waiting for the lock or spending the revoked refresh token:
Gotchas
The environment binding stays. The profile still references the environment it was bound to (
identity), so the nextceligo logininto it is refused if it reaches another account or environment, unless--allow-account-mismatch. See The environment binding.Deleting the config file is not a sign-out. Removing
~/.celigo/config.jsonor a profile'soauthblock by hand revokes nothing: the session's tokens stay valid on the server until they expire. Runlogoutfirst.profile deleteof a signed-in profile revokes its session aslogoutdoes.Under
profile_pin_policy = strict. A--profileorCELIGO_PROFILEnaming any profile other than the active one is refused with the policy's refusal, before anything is read or revoked. Under the defaultallow,logouton a profile pinned away from the active one printsceligo: profile 'acme-corp-sandbox' → api.integrator.io (pinned with --profile; the active profile is 'acme-corp-production')on stderr first. See Refusing a pinned profile.CELIGO_API_TOKENis not affected.logoutclears only the profile's stored session; a token in--tokenorCELIGO_API_TOKENkeeps working, because it wins over the profile's credential.
Related
login — sign in again, and how a session is bound and renewed.
profile —
profile deleterevokes a signed-in profile's session;profile whoamishows what a profile authenticates as.config —
config unset api_tokenclears an API token.Authenticate — the two credentials, and rotating them.
Last updated
Was this helpful?