pub.techne.draft.identity.manageMethods

The identity PDS's signed hook for the sign-in method rules (the account page and sign-in page call it; the rules live on the platform so every client obeys the same ones). Authenticated only by the epds-signature MAC with the identity hook secret; no session, OAuth or service-JWT caller reaches it, and every answer is signed. The PDS vouches for the signed-in account (`did`, which must be hosted on the calling PDS, else 404 UnknownAccount) and for the step-up it just checked (`stepUp`: which method, when; it counts for 10 minutes). Rules: a recovery method acting with a fresh step-up acts at once; anything else removes a method or deletes the account after a 7-day wait with an email notice, if it has any email method, cancellable by any of the account's methods, a frozen one too (`cancel`); a wait re-checks these rules when it runs out (a method marked for recovery meanwhile is not removed; a first mark is dropped once another method is marked; a wait during which any of the account's methods was frozen, even if a recovery method lifted the freeze early or removed the method, is dropped, not completed, since a frozen method can't sign in to cancel it, and every email method gets a `waitDropped` notice naming the change); a freeze is immediate, from a different method with a fresh step-up, and lasts 7 days or until a recovery method lifts it (`unfreeze`); a recovery method is never frozen, removed or unmarked by an unmarked one; the last way to sign in is never removed; marking a recovery method needs a fresh step-up of one, except the account's first, which needs a fresh step-up of any of its methods (else StepUpRequired) and waits 24 hours with an email notice, if the account has any email method. Notices are email only: the platform sends every one itself, wherever the account is hosted, to each of the account's email methods (never by phone or Nostr); the PDS sends none. Ops: `list` (the account's methods, each email and phone also with its full `value` for the owner's own account page, pending changes (an open `moveMethod` onto the account included), `hasRecovery`, and `person`, the other accounts of its person), `signInMethods` (for a sign-in page that knows only the account, "Sign in as @handle": the methods that can sign in now, each a masked `display` for any page and a masked `displayDevice` for the PDS's chooser of the accounts already signed in on that browser, never its full value; no step-up, recovery marks or pending changes), `sendTo` (the full email or phone of one of them, for the PDS to send a sign-in code to; never shown), `remove`, `cancel`, `freeze` (with `signOut`), `unfreeze`, `mark`, `unmark`, `signOut` (sign out everywhere the platform holds a session; the PDS revokes its own), `delete`, `addExternal` (a passkey or Nostr key the PDS proved; always a fresh step-up of one of the account's methods, StepUpRequired without one, and never a program's, ProgramRefused), `newRecoveryCodes` (returned once; a new set ends the old; always a fresh step-up, and on an account with no recovery method the set is its first mark, which waits 24 hours; a first set is refused, MethodFrozen, while one of the account's methods is frozen), `redeemCode`, `setPrograms` ("Programs can sign in with this key" on or off, `on`, for a Nostr key, the only type that supports it: on and off both need a fresh step-up of one of the account's methods that is not a program, not frozen (a step-up by a key with programs on is ProgramRefused, so that key never switches itself off); on is also refused from the key itself, SameMethod, for a recovery method or one whose first mark is waiting, IsRecovery, and while a method of the account is frozen, MethodFrozen), `addChannel` (a `channel` the PDS just proved for `did`, as identity.finishAddMethod does for a session: `added`, `alreadyYours`, or `boundElsewhere`: when both accounts hold something, with the `other` account and its `method` (the account page offers `moveMethod`), else with a fold `offer` (identity.finishAddMethod#offer), single use, 10 minutes, bound to `did` on this hook and to no session; MethodFrozen when the channel is frozen on any account, MethodFrozen when `did` itself has a frozen method and the channel would be new to it (no method is added past a freeze; `addExternal` likewise), and, on the fold path only (one of the two accounts holds nothing, so an `offer` would be made), ProtectedAccount when either account has a recovery mark, a freeze, a pending change, or a passkey, Nostr key or recovery codes; when both hold something the answer names `other` and `method` and moveMethod's own refusals apply), `fold` (take that offer: `token`; needs a fresh step-up of `did`; ProtectedAccount (a live freeze included) and NotEmpty, checked again; `folded` with the kept `did` and the `emptied` one, which is deleted (on the identity PDS too, by `dueDeletes`)), `moveMethod` (link two accounts: move an email or phone method of account `from` onto `did` and make the two accounts one person, every DID of each linked to every other in `alsoKnownAs`; needs a fresh step-up of `did` and one of `from` (`fromStepUp`, else FromStepUpRequired); refused, nothing scheduled, when a method of either person is frozen (Frozen), either has a pending change (PendingChange), the person would hold more than 4 accounts (TooMany), the two are already one person or the same account (Same), or no key can write `alsoKnownAs` for one of their DIDs (NoKey); a method marked for recovery on `from` moves only with a `fromStepUp` of a recovery method of `from` (RecoveryProtected); it is never done inside the call: the answer is `pending` (the change, a pending change of `from`, as a defs#pendingChange as `did`'s `list` shows it) with `due`, its `dueAt`: now for a move such a step-up proved, else 7 days on, a wait `from` is told about by email (a recovery-proven move is told only when it completes), which any method of either account can `cancel`, and which a freeze of either person's methods drops (`waitDropped` to `from`); the platform completes it once due: a move whose key check or `alsoKnownAs` writes fail is tried again after a backoff (2^tries minutes, at most an hour), one refused for good (no key we can ask holds it, or the identity PDS refuses the account) is dropped with a `moveDropped` email to both accounts, one still failing 24 hours past `due` is dropped with `moveTimedOut`, one whose accounts changed meanwhile (the method gone, or marked for recovery since unless a recovery method proved the move; a refusal above other than a freeze; or a recovery-proven requester no longer a recovery method) is dropped with `moveCancelled` to both, and a completed one sends every account of the person a `linked` email), `unlink` (account `other` leaves `did`'s person at once; the removal of the `alsoKnownAs` entries between it and the rest is queued, tried again after a failure, and given up after about a day, or at once when refused for good, with an `akaLeft` email to both accounts of the entry; needs a fresh step-up of `did`; when `other` would be left with no way to sign in, `method`, one of `did`'s email or phone methods, is required (else NeedsMethod) and moves to `other`, which needs a step-up of a recovery method of `did` or of that method itself (NeedsRecoveryMethod), a recovery method's step-up for a method marked for recovery (RecoveryProtected), a method that is not frozen (MethodFrozen) and not `did`'s last way to sign in (LastMethod); NotLinked when `other` is not in `did`'s person; an email handed to `other` is released from `did`'s identity-PDS account, tried again after a failure and given up after about a day with an `emailLeft` email to `did`; both accounts get an `unlinked` email), `link` (retired, answers 400 InvalidRequest: a link is `moveMethod` now), `importBackupEmails` (once per account, recorded: a second call answers `alreadyImported` even after every mark is taken off; the move of the PDS's verified backup emails, `backupEmails`, each with when the PDS verified it: one verified before 2026-11-13T00:00:00Z becomes an email method marked for recovery at once, without step-up or wait, and one verified at or after it is skipped, `afterCutoff`, since only the holder could have added one before these rules; only an account with no recovery method takes one, all of its addresses in one call (each address once, else 400 InvalidRequest), else `hasRecovery`, nothing changes and the import is spent; a call that marks none of them spends it too; MethodFrozen while one of the account's methods is frozen, not spent; `indexOff` while the identity index is off), `notices` and `noticesSent` (no `did`; unused, kept for older clients: `notices` always answers an empty list and `noticesSent` `count: 0`, since the platform sends every notice itself), for a login service that just checked a signature by a Nostr key and knows no account yet (no `did`) `findKey` (`external`, type `nostr` and the 64-character lowercase hex key: `none` when no account the calling PDS hosts has it, else `done` with the account's `did`, the key's `method`, whether that method is `frozen` now, and whether `programs` may sign in with it), and for scheduled account deletions that came due (no `did`; only the accounts the calling PDS hosts) `dueDeletes` (up to 100 accounts the platform has deleted on its side, which the PDS deletes too; one taken and not confirmed is offered again after 5 minutes, without limit) and `dueDeletesDone` (`dids` the PDS deleted), and for a consent screen after sign-in `operator` (`operator`: whether `did` is one of the platform's operators, so the PDS offers the moderate scope, `include:pub.techne.draft.authModerate`, to operators only and drops it from everyone else's grant). Programs: a key with programs on can't be marked (ProgramsOn), and a program never touches account security: when the PDS says a program made the request (`program`), or the step-up names a key with programs on, every op but `list`, `signInMethods` and `sendTo` is 403 ProgramRefused (`operator` included: a program never moderates), `setPrograms` included: such a key's programs are turned off by a step-up of another of the account's methods.

Details · procedure
Kindprocedure
Authorityidentity.draft.techne.pub
Commit rev3n3iob5mtgw2u
Indexed

What's different

There is nothing to compare yet: this is the only version of pub.techne.draft.identity.manageMethods anywhere.