pub.techne.draft.identity.finishAddMethod

Finish adding a sign-in method with the code identity.beginAddMethod sent. `added`: the method is now bound to the caller's account. `alreadyYours`: it already was (re-issued). `boundElsewhere`: it signs in to another account. When one of the two accounts is empty and new, `offer` (`fold`) says it can be folded into the other with identity.fold; when both hold something, `other` names that account and no offer is made: the two are linked by moving the method (identity.manageMethods moveMethod, on the identity PDS's account page). The `link` offer is retired. The offer's token is single-use, bound to both accounts, the channel and this session, and lasts 10 minutes. `unavailable`: the method cannot be added right now.

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

Procedure

procedure · POST

Input

application/json

challenge

requiredstring
  • maxLength: 128

code

requiredstring
  • maxLength: 16

Output

application/json

`added` / `alreadyYours`: the method. Absent on `boundElsewhere`: the other account's method is named only to the identity PDS (identity.manageMethods addChannel).

Reference

other

string · did

`boundElsewhere` when both accounts hold something: the account the method signs in to (no `offer`).

status

requiredstring
  • knownValues: added | alreadyYours | boundElsewhere | unavailable

Errors

AuthenticationRequired

No signed-in caller.

InvalidCode

The code is wrong, expired or used up, or the challenge is not the caller's.

RateLimitExceeded

A phone code: the provider that sent it is refusing more checks for this number for now (HTTP 429). Wait a few minutes.

MethodFrozen

The channel was frozen on its account since the code was sent, or it would be new to the caller's account while one of its methods is frozen (HTTP 403).

ProtectedAccount

The channel signs in to another account, and one of the two has a recovery mark, a live freeze, a pending change, or a passkey, Nostr key or recovery codes (HTTP 409): no fold or link is offered, and the other account is not named (no `boundElsewhere`).

UpstreamFailure

A phone code: the provider that sent it could not be asked whether it matches (HTTP 502). The code is not spent; try again.

#offer

object

Properties

action

requiredstring

`fold`. (`link` is retired and no longer offered.)

  • knownValues: fold | link

expiresAt

requiredstring · datetime

keep

string · did

With `fold`: the account that is kept (the other one is emptied into it and deleted).

other

requiredstring · did

The account the method is bound to.

token

requiredstring
  • maxLength: 128

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • 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 me