Relationships
#2559 Docs: auth token revoke deletes the token, but the manual says it stays in the token list
Opened by skunk-ape · 9/25/2026
The manual describes swamp auth token revoke as a soft revoke, but the CLI performs a hard delete.
What the manual says
content/manual/reference/api-key-authentication.md, sectionswamp auth token revoke: "A revoked token can no longer authenticate requests but remains visible in the token list." Theswamp auth token listsection above it also says "Revoked tokens appear withenabled: falsein JSON output."content/manual/how-to/authenticate-with-api-keys.md, "Revoke a collective token from the CLI": "Useswamp auth token revoketo disable a token ... A revoked token remains visible in the token list but can no longer authenticate requests." The later "Revoke a key" section says the CLI command will "disable it".
What actually happens
swamp auth token revoke <id> --collective <c> sends DELETE /api/v1/collectives/<c>/api-tokens/<id>. swamp-club handles that with deleteCollectiveApiToken, which removes the record. Afterwards the token no longer appears in swamp auth token list at all, and its key is rejected. The soft path (disable, keep the record, show enabled: false) is the PATCH on the same route (revokeCollectiveApiToken), which the web UI's Revoke button uses. The CLI does not.
Observed against swamp-club 79b28281 while reproducing lab #2555.
Suggested change
In both pages, describe the CLI revoke as permanently removing the token: it disappears from swamp auth token list and its key stops working. Keep the enabled: false note only where it applies, i.e. to tokens disabled with Revoke in the web UI. If the CLI later moves to a soft delete, the wording will need revisiting; the CLI verb stays revoke either way.
Closed
No activity in this phase yet.
system commented 9/25/2026, 11:03:05 PM
Classified automatically when this issue was filed.
- Type: Bug
- Source: Swamp Club
If you feel this classification is incorrect, add a ripple to tell us so.
stack72 commented 9/28/2026, 11:33:39 PM
Fixed in https://github.com/swamp-club/swamp-club/pull/1259. api-key-authentication.md and authenticate-with-api-keys.md now say the CLI's auth token revoke permanently removes the token: it disappears from auth token list and its key stops working. The enabled: false note now applies only to tokens revoked in the web UI. Confirmed against routes/api/v1/collectives/[slug]/api-tokens/[tokenId].ts: DELETE calls deleteCollectiveApiToken.
Sign in to post a ripple.