cmd oauth - nself-org/cli GitHub Wiki
Manage OAuth provider tokens for ɳSelf plugins.
nself oauth <subcommand>
nself oauth refresh <provider> [flags]
nself oauth refresh --all [flags]
nself oauth manages OAuth provider tokens. Use nself oauth refresh to trigger
an immediate token refresh outside the scheduled cron window, for example after
a provider outage or a B-21-style token expiry incident.
| Subcommand | Description |
|---|---|
refresh |
Trigger immediate OAuth token refresh for a provider |
Force an immediate OAuth token refresh outside the cron schedule.
| Flag | Default | Description |
|---|---|---|
--account-id <id> |
— | Scope refresh to a single account |
--all |
false | Refresh all providers in parallel |
--base-url <url> |
$NSELF_API_URL |
ɳSelf API base URL |
- Posts to the provider plugin's
/oauth/refresh-nowendpoint - Runs providers in parallel when
--allis used - Reports success/failure per account, not aggregated
- Never exposes OAuth token values in output (only key prefixes)
- Success is visible in OAuth refresh Prometheus metrics within 5s (requires S41-T03 exporter)
- Exits non-zero if any account fails
# Refresh Google OAuth tokens
nself oauth refresh google
# Refresh a specific account
nself oauth refresh google --account-id [email protected]
# Refresh all configured providers (parallel)
nself oauth refresh --all| Code | Meaning |
|---|---|
| 0 | All accounts refreshed successfully |
| 1 | One or more accounts failed , see per-account output |
- Observability, oauth_token_refresh_total metric
- google plugin, Google OAuth configuration