Skip to main content
POST/gate/passkeys/signin/begin

Begin Passkey Sign-In

Initiates WebAuthn passkey authentication for an end-user by returning an assertion challenge.

The challenge is presented to the client-side WebAuthn API to prompt the user's registered authenticator; the resulting signed assertion is submitted to the finish endpoint.

This endpoint is app-layer-unauthenticated — no existing JWT is required to begin passkey sign-in.

Parameters
projectSlug *path

The project's slug: the path segment after @.

It is unique within the org.

Request body
emailstring <email>

The end user's email address.

When given, allowCredentials lists that end user's passkeys.

Omit it for a discoverable-credential sign-in, where the browser offers every passkey it holds for this site.

Responses
HTTPK9O CodeDescription
200Success
404K9O_END_USER_NOT_FOUNDNo account was found for the provided identity.
Response body (200)
data *object

WebAuthn authentication options (PublicKeyCredentialRequestOptionsJSON).

Pass them to the browser, for example to startAuthentication() from @simplewebauthn/browser, then send the result to signin/finish.

rpId *string

The relying party id the passkey must be bound to, set by the deployment.

challenge *string

A random challenge, base64url.

It is held for this ceremony and works once; pass the options to the browser unchanged.

allowCredentials *object[]

The passkeys of the end user named by email.

Empty when no email was sent, or when that address has no passkeys: the browser then offers any passkey it holds for this site.

id *string

The credential id, base64url.

transports *string[]

How the browser can reach the authenticator, as the authenticator reported at registration (usb, nfc, ble, internal, hybrid, ...).

type *"public-key"

The credential type.

Always public-key.

timeout *integer

How long the browser may wait for the end user, in milliseconds.

Always 60000.

userVerification *"preferred"

User verification (biometric or PIN) is asked for.

Sign-in/finish requires that it was done.

meta *any

Request metadata: cost, timing and the request and trace ids.

TypeScript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.gate.passkeys.signIn.begin({
  email: '[email protected]'
})

Showing example in TypeScript

Request example
{
  "email": "[email protected]"
}
Response example (200)
{
  "data": {
    "rpId": "string",
    "challenge": "string",
    "allowCredentials": [
      {
        "id": "string",
        "transports": [
          "string"
        ],
        "type": "public-key"
      }
    ],
    "timeout": 0,
    "userVerification": "preferred"
  }
}

More in Sign-in & Sessions