Grant a sudo-mode window by proving a passkey
POST/api/auth/sudo/passkey/finish
sudoPasskeyFinish
Authenticated (session cookie). Verifies the assertion and stamps `sessions.sudo_until = now() + 5min`, the same window the password and TOTP sudo routes grant. The challenge must be one this session's account started for **sudo** specifically — a challenge from the public login endpoint is refused, which is what stops an unauthenticated ceremony being spent to clear the step-up gate. Per-session rate limit: 5 attempts per 15 minutes.
Requires authentication using a session cookie — see tokens and scopes.
curl
curl -X POST 'https://neosource.dev/api/auth/sudo/passkey/finish' \
-b 'ns_session=$NEOSOURCE_SESSION' \
-H 'Content-Type: application/json' \
-d '{"challenge_id":"string","response":"string"}'fetch
fetch("https://neosource.dev/api/auth/sudo/passkey/finish", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
credentials: "include",
body: JSON.stringify({"challenge_id":"string","response":"string"}),
});Request bodyrequired
application/json
Responses
200Sudo granted; window expires at `sudo_until`
application/json
Standard errors
Bodies documented once for the whole API — see standard errors.
- 400Bearer-token caller has no session to grant sudo on
- 401Authentication required
- 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