Mint a token with a passkey
POST
/session/passkey.json
const url = 'https://your-board.mudda.today/session/passkey.json';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"passkey":{"id":"AbC123…","client_data_json":"eyJ0eXBlIjoid2ViYXV0aG4uZ2V0Ii…","authenticator_data":"SZYN5YgOjGh0NBcPZHZgW4…","signature":"MEUCIQD…"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://your-board.mudda.today/session/passkey.json \ --header 'Content-Type: application/json' \ --data '{ "passkey": { "id": "AbC123…", "client_data_json": "eyJ0eXBlIjoid2ViYXV0aG4uZ2V0Ii…", "authenticator_data": "SZYN5YgOjGh0NBcPZHZgW4…", "signature": "MEUCIQD…" } }'Completes a WebAuthn passkey sign-in and mints a json-sign-in token with the default
scopes. The body is the browser’s WebAuthn assertion.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
The WebAuthn assertion produced by navigator.credentials.get.
object
key
additional properties
any
Example
{ "passkey": { "id": "AbC123…", "client_data_json": "eyJ0eXBlIjoid2ViYXV0aG4uZ2V0Ii…", "authenticator_data": "SZYN5YgOjGh0NBcPZHZgW4…", "signature": "MEUCIQD…" }}Responses
Section titled “Responses”The new token.
Media typeapplication/json
object
session_token
required
string
Example
{ "session_token": "eyJfcmFpbHMiOnsi…"}No credential, or a revoked or expired token.
Media typeapplication/json
Every failure’s envelope. request_id matches the X-Request-Id header.
object
errors
required
Messages keyed by field; base when no field is to blame.
object
key
additional properties
Array<string>
request_id
string
Example
{ "errors": { "base": [ "Unauthorized" ] }, "request_id": "5f0c1e9a-2b7d-4c1e-9a63-0e4f8d2b1c55"}Too many sign-in attempts (10 in 3 minutes); try again later.
Media typeapplication/json
Every failure’s envelope. request_id matches the X-Request-Id header.
object
errors
required
Messages keyed by field; base when no field is to blame.
object
key
additional properties
Array<string>
request_id
string
Example
{ "errors": { "base": [ "Try again later." ] }, "request_id": "5f0c1e9a-2b7d-4c1e-9a63-0e4f8d2b1c55"}