Repository navigation
Document 1Password disconnect, revoking accounts, and revoke on delete - #767
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
…n details Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
masnwilliams
left a comment
There was a problem hiding this comment.
Thanks, this matches the backend behavior closely. I checked each claim against the API, and three things would mislead readers. All three are small fixes and are commented inline:
- A vault delete that returns
409has already disconnected its accounts and cleared their credentials' approvals. - The disconnect sample can send the request again, because the SDKs retry
409by default. - Relinking fails while the account is still
revoking.
Optional
credential_account_revocation_startedis only recorded when KERNEL sends a revoke to 1Password. A detach records onlycredential_account_detached. "KERNEL started revoking the connection at 1Password" would describe it more accurately.- With
include_deleted, a key matches a live item before a deleted one. If an account was recreated under the same key, the events sample returns the new account's events. Suggest passing the deleted item's id to read the old account's history. - The page now says KERNEL doesn't revoke a token you supplied three times (the own-client section, Delete items, and Limitations). The copy in Delete items can go.
- The three "1Password hasn't confirmed yet" paragraphs (disconnect, account delete, vault delete) could become one short table. It's not needed once the fixes are in.
| deleting a vault ends each of its 1Password accounts the same way. if 1Password | ||
| hasn't confirmed one of them, the delete returns `409` | ||
| `provider_revocation_pending` and keeps the vault. retry the deletion later. |
There was a problem hiding this comment.
Deleting a vault disconnects every 1Password account in it before checking whether any revoke is still pending. So when this returns 409 provider_revocation_pending and keeps the vault, the accounts are already reconnect_required or revoking, and all their credential items have lost their approvals. Someone who reads the 409 as "nothing happened" will find their logins no longer fill.
| deleting a vault ends each of its 1Password accounts the same way. if 1Password | |
| hasn't confirmed one of them, the delete returns `409` | |
| `provider_revocation_pending` and keeps the vault. retry the deletion later. | |
| deleting a vault disconnects each of its 1Password accounts, then deletes the | |
| vault. if 1Password hasn't confirmed one of them, the delete returns `409` | |
| `provider_revocation_pending` and keeps the vault, but its accounts are already | |
| disconnected and their `credential` items have lost their approvals. don't keep | |
| using the vault; retry the deletion later. |
There was a problem hiding this comment.
Done in 25eb20d, with your wording: the accounts are already disconnected, their credentials have lost their approvals, and the vault shouldn't be used before retrying the deletion.
| const disconnected = await kernel.vaults.items.performOperation("1password-account", { | ||
| id_or_name: vault.id, | ||
| type: "1pw_disconnect", | ||
| }); |
There was a problem hiding this comment.
Both SDKs retry 409 responses by default, and this one doesn't set x-should-retry: false. A pending revoke therefore makes this sample send 1pw_disconnect up to three times, which contradicts "don't invoke it again" below. Repeating it is harmless on the server, but it can block for about a minute. Turning off retries, as the 1pw_fill sample already does, keeps the sample and the text consistent.
| }); | |
| }, { maxRetries: 0 }); |
There was a problem hiding this comment.
Done in 25eb20d: the TypeScript sample passes { maxRetries: 0 }, matching the 1pw_fill sample.
| ```python Python | ||
| disconnected = kernel.vaults.items.perform_operation( | ||
| "1password-account", | ||
| id_or_name=vault.id, |
There was a problem hiding this comment.
Same as the TypeScript sample: turn off SDK retries so a 409 provider_revocation_pending isn't sent again.
| id_or_name=vault.id, | |
| disconnected = kernel.with_options(max_retries=0).vaults.items.perform_operation( |
There was a problem hiding this comment.
Done in 25eb20d: the Python sample uses with_options(max_retries=0).
|
|
||
| - fills from the account stop immediately. | ||
| - KERNEL revokes the connection at 1Password, unless another vault still uses it; then only this vault's link ends. | ||
| - the account returns to `reconnect_required`. repeat the account upsert to link it again. |
There was a problem hiding this comment.
Upserting a revoking account returns 409. Linking the same 1Password user in another vault during that time also fails: the account goes to reconnect_required with "1Password is ending this person's previous connection". Readers need to wait before relinking.
| - the account returns to `reconnect_required`. repeat the account upsert to link it again. | |
| - the account returns to `reconnect_required`. once it's no longer `revoking`, repeat the account upsert to link it again. |
There was a problem hiding this comment.
Done in 25eb20d: relink once the account is no longer revoking.
| | `connected` | the connection is usable | define credential items | | ||
| | `declined` | the user declined consent | repeat the upsert to get a new authorization url, or use `1pw_recover` when it's advertised | | ||
| | `reconnect_required` | the connection needs reauthorization; `state.status_reason` explains why | repeat the upsert, or use `1pw_recover` when it's advertised | | ||
| | `revoking` | the account was disconnected or deleted, and 1Password hasn't confirmed yet. fills have stopped. | nothing; KERNEL finishes it in the background | |
There was a problem hiding this comment.
"nothing" isn't quite right: an account upsert returns 409 until the account leaves revoking.
| | `revoking` | the account was disconnected or deleted, and 1Password hasn't confirmed yet. fills have stopped. | nothing; KERNEL finishes it in the background | | |
| | `revoking` | the account was disconnected or deleted, and 1Password hasn't confirmed yet. fills have stopped. | wait; KERNEL finishes it in the background. don't upsert the account until it leaves `revoking` | |
There was a problem hiding this comment.
Done in 25eb20d: the revoking row now says to wait and not upsert the account until it leaves revoking.
…connect, wait for revoking Also says revocation_started means a revoke was sent, reads deleted events by account id, and drops a repeated sentence about supplied tokens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @masnwilliams, all three fixes are in 25eb20d. From the optional notes:
I left the three pending paragraphs as prose rather than a table, since they read fine with the fixes in. |
masnwilliams
left a comment
There was a problem hiding this comment.
Thanks, all three fixes look right, and the optional changes too. Checks are green.
Two optional wording notes, not blocking:
- "fills from the account stop immediately": KERNEL refuses new
1pw_fillcalls right away, but a fill already running can still finish with the login the extension already fetched. "new fills are refused immediately" would be exact. credential_account_revocation_unconfirmeddoesn't say what happens to the connection. Without a usable token it can't be revoked, so it lapses when its refresh token expires, within 30 days of its last refresh. Worth a clause for readers doing a security review.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Took both in 53e785a, thanks. "new fills are refused" now replaces "fills stop" in the disconnect bullet, the |
Summary
Documents the 1Password disconnect and revoke behavior from kernel/kernel#5543 and kernel/kernel#5544 (in production, SDK 0.149.0):
1pw_disconnectis offered, what it does (fills stop, revoke or detach, account back toreconnect_required, credentials need new access requests after relinking), the409 provider_revocation_pendingcase, and the five revocation events.revokingadded to the account status table.include_deletedfor reading events after deletion.🤖 Generated with Claude Code
Note
Low Risk
Documentation-only updates to 1Password vault guides; no runtime or API implementation changes.
Overview
Expands
vaults/1password.mdxto match KERNEL disconnect/revoke behavior (SDK 0.149.0).Adds a Disconnect an account section for
1pw_disconnect: when it’s available, immediate fill refusal, revoke vs vault detach, transition toreconnect_required/ credential re-approval,409 provider_revocation_pending, and revocation events, with TypeScript/Python samples.The account status table gains
revoking. The KERNEL-managed checklist adds step 5 to call1pw_disconnecton user disconnect.Delete items is updated for account/vault deletion triggering the same revoke flow, partial vault delete on pending revoke, and reading post-delete account events via
include_deleted: true.Reviewed by Cursor Bugbot for commit 53e785a. Bugbot is set up for automated code reviews on this repo. Configure here.