Complete passkey registration
POST/api/auth/webauthn/register/finish
webauthnRegisterFinish
Sudo-gated. Verifies the authenticator's attestation response against the stored ceremony and persists the credential. The `challenge_id` must be one this account started for registration: a challenge minted by the login or sudo endpoints is refused, as is one belonging to another account.
Requires authentication using a session cookie — see tokens and scopes.
curl
curl -X POST 'https://neosource.dev/api/auth/webauthn/register/finish' \
-b 'ns_session=$NEOSOURCE_SESSION' \
-H 'Content-Type: application/json' \
-d '{"challenge_id":"string","response":"string"}'fetch
fetch("https://neosource.dev/api/auth/webauthn/register/finish", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
credentials: "include",
body: JSON.stringify({"challenge_id":"string","response":"string"}),
});Request bodyrequired
application/json
Responses
200Passkey registered
application/json
403Sudo required — the `challenge` field names which sudo-prove endpoint to call
application/json
Standard errors
Bodies documented once for the whole API — see standard errors.
- 400Malformed or unverifiable authenticator response
- 401Authentication required
- 409This authenticator is already registered
- 429Rate limited — retry after the `Retry-After` header
- 500Internal server error
- 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
- 504Gateway timeout — the request exceeded the server's handling budget