TypeScript SDK: Sign in with Doorman

The methods of the TypeScript client under Sign in with Doorman. The relying parties a developer registers, the sign-ins that wait for the owner's decision, and what the web app does for a browser on the way. Every operation answers 404 until the deployment switches sign-in on.

client.signIn.clients.list

TypeScript

client.signIn.clients.list(): Promise<SignInClientList>

Sends signIn.clients.list: GET /v1/sign-in/clients

List relying parties.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused. Part of Sign in with Doorman, which a deployment switches on: where it is off, the call answers 404 not_found.

client.signIn.clients.create

TypeScript

client.signIn.clients.create(body: CreateSignInClient): Promise<CreatedSignInClient>

Sends signIn.clients.create: POST /v1/sign-in/clients

Unless the relying party is a public one, the answer carries its secret, once.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused. Part of Sign in with Doorman, which a deployment switches on: where it is off, the call answers 404 not_found.

client.signIn.clients.get

TypeScript

client.signIn.clients.get(clientId: string): Promise<SignInClient>

Sends signIn.clients.get: GET /v1/sign-in/clients/{clientId}

Read a relying party.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused. Part of Sign in with Doorman, which a deployment switches on: where it is off, the call answers 404 not_found.

client.signIn.clients.update

TypeScript

client.signIn.clients.update(clientId: string, body: UpdateSignInClient): Promise<SignInClient>

Sends signIn.clients.update: PATCH /v1/sign-in/clients/{clientId}

Editing ends the sign-ins in progress and keeps the addresses already allowed. The host never changes.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused. Part of Sign in with Doorman, which a deployment switches on: where it is off, the call answers 404 not_found.

client.signIn.clients.delete

TypeScript

client.signIn.clients.delete(clientId: string): Promise<void>

Sends signIn.clients.delete: DELETE /v1/sign-in/clients/{clientId}

No address can sign in to it afterwards, and what was decided about it leaves every passport.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused. Part of Sign in with Doorman, which a deployment switches on: where it is off, the call answers 404 not_found.

client.signIn.clients.rotateSecret

TypeScript

client.signIn.clients.rotateSecret(clientId: string): Promise<SignInClientSecret>

Sends signIn.clients.rotateSecret: POST /v1/sign-in/clients/{clientId}/rotate-secret

Confidential relying parties only. The new secret is returned once; the one before it stops working at once.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused. Part of Sign in with Doorman, which a deployment switches on: where it is off, the call answers 404 not_found.

client.signIn.clients.verify

TypeScript

client.signIn.clients.verify(clientId: string): Promise<SignInClient>

Sends signIn.clients.verify: POST /v1/sign-in/clients/{clientId}/verify

Reads the proof file from the relying party's host. Until it checks out, only addresses of the registering account can sign in.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused. Part of Sign in with Doorman, which a deployment switches on: where it is off, the call answers 404 not_found.

client.signIn.requests.get

TypeScript

client.signIn.requests.get(requestId: string): Promise<SignInApproval>

Sends signIn.requests.get: GET /v1/sign-in/requests/{requestId}

Requires a console session, and binds the request to it.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused. Part of Sign in with Doorman, which a deployment switches on: where it is off, the call answers 404 not_found.

client.signIn.requests.decide

TypeScript

client.signIn.requests.decide(requestId: string, body: DecideSignIn): Promise<SignInDecision>

Sends signIn.requests.decide: POST /v1/sign-in/requests/{requestId}

Requires the console session that read the request, and the csrf that read returned.

Access session: a console session only; an API key gets 403 session_required. App tokens are refused. Part of Sign in with Doorman, which a deployment switches on: where it is off, the call answers 404 not_found.

client.signIn.requests.resume

TypeScript

client.signIn.requests.resume(body: ResumeSignIn): Promise<SignInResumed>

Sends signIn.requests.resume: POST /sign-in/requests/resume

What the web app's server asks for the browser a waiting request belongs to. It takes no credential and none is sent: the request, and the binding the browser holds, are what the API answers to.

Access public: no credential. Part of Sign in with Doorman, which a deployment switches on: where it is off, the call answers 404 not_found.

TypeScript

client.signIn.links.read(body: SignInLinkRequest): Promise<SignInLinkPreview>

Sends signIn.links.read: POST /sign-in/links/read

What the link is for, so a page can say it before anyone continues. Reading spends nothing.

Access public: no credential. Part of Sign in with Doorman, which a deployment switches on: where it is off, the call answers 404 not_found.

TypeScript

client.signIn.links.open(body: SignInLinkRequest): Promise<SignInLinkOpened>

Sends signIn.links.open: POST /sign-in/links/open

Spends the link, whatever happens next, and answers the browser's binding and where it continues.

Access public: no credential. Part of Sign in with Doorman, which a deployment switches on: where it is off, the call answers 404 not_found.

Up Down to move, Enter to open, Esc to close