- Docs
- Api%2Freference%2Fwallets%2FPasskeyRegisterOptions
Start creating a passkey
Step one of registering a user with a passkey — Face ID, Touch ID, Windows Hello or a hardware key. No password, nothing to remember, nothing to phish. Convert the JSON response into the binary values WebAuthn expects, then give it to the browser: ```js const optionsJSON = await fetch('/wallets/connect/passkey/register/options') .then(r => r.json()); const options = PublicKeyCredential.parseCreationOptionsFromJSON(optionsJSON); const credential = await navigator.credentials.create({ publicKey: options }); ``` Then serialize the result with `credential.toJSON()`, add the required `organization_id`, and send it to `POST /wallets/connect/passkey/register/verify`, which creates the wallet and signs them in. No sign-in needed — this is how a new user signs up.
Response Body
application/json
application/json
application/json
curl -X GET "https://api.dual.network/wallets/connect/passkey/register/options"{
"challenge": "s5f2X8kQvLbA1mZ0pYtR7cJdEwNhGuIoP3qS6rT9vXk",
"rp": {
"id": "dual.network",
"name": "Dual"
},
"user": {
"id": "NjY1ZjFjMmQ0YjFhMmMzZDRlNWY2YTAx",
"name": "dual.network",
"displayName": "Dual"
},
"pubKeyCredParams": [
{
"type": "public-key",
"alg": -7
}
],
"authenticatorSelection": {
"residentKey": "required",
"userVerification": "required"
},
"timeout": 60000
}{
"code": 3,
"message": "Key: 'limit' Error:Field validation for 'limit' failed on the 'lte' tag"
}{
"code": 13,
"message": "internal error"
}