Authentication
All security endpoints require authentication via therequireAuth middleware. Include a valid session token in your request.
Get Security Overview
Retrieve an overview of the user’s security settings, including all passkeys and trust code information.Response
Array of passkey objects
Unique identifier for the passkey (base64url encoded credential ID)
User-assigned name for the passkey
Timestamp of when the passkey was created
Timestamp of when the passkey was last used for authentication
Type of device (e.g., “singleDevice” or “multiDevice”)
Number of unused trust codes available
Empty array (security questions have been removed from Ave)
Passkey Registration
Start Passkey Registration
Generate WebAuthn registration options to begin passkey registration. Returns options that should be passed to the WebAuthn API.Response
WebAuthn registration options object
Base64url-encoded challenge (valid for 5 minutes)
Relying party information
User information for the credential
Supported public key credential parameters
Authenticator selection criteria (requires resident key and user verification)
Array of existing passkey IDs to exclude from registration
Complete Passkey Registration
Complete passkey registration by verifying the WebAuthn credential response.Request Body
WebAuthn credential response from navigator.credentials.create()
Optional name for the passkey (max 64 characters). Defaults to “New Passkey” if not provided.
Optional PRF-encrypted master key if the passkey supports PRF extension
Response
Error Responses
400- Registration session expired (challenge expired after 5 minutes)400- Invalid origin (must be localhost or configured production origin)400- Invalid credential format400- Passkey verification failed
Activity Log
Successful passkey registration logs apasskey_added action with severity info.
Update Passkey
Update a passkey’s name or PRF-encrypted master key.Path Parameters
The unique identifier of the passkey to update
Request Body
New name for the passkey (1-64 characters)
New PRF-encrypted master key
Response
Returns true if the update was successful
Error Responses
404- Passkey not found or does not belong to the authenticated user
Master Key Unlock
Start Master Key Unlock
Initiate master key unlock process using a PRF-enabled passkey. Only passkeys with a stored PRF-encrypted master key can be used.Response
Unique session ID for this unlock attempt (valid for 5 minutes)
Error Responses
400- No PRF-enabled passkeys found (error code: “no_prf_passkey”)
Finish Master Key Unlock
Complete master key unlock by verifying the WebAuthn authentication response.Request Body
The unlock session ID from the start endpoint
WebAuthn credential response from navigator.credentials.get()
Response
The PRF-encrypted master key that can be decrypted using the PRF output
Error Responses
400- Unlock session expired (error code: “unlock_session_expired”)403- Session does not belong to authenticated user (error code: “forbidden”)400- Invalid origin (error code: “invalid_origin”)400- Invalid credential format (error code: “invalid_credential_format”)404- Passkey not found (error code: “passkey_not_found”)400- Passkey verification failed (error code: “passkey_verification_failed”)400- No PRF master key stored on this passkey (error code: “no_prf_master_key”)
Delete Passkey
Delete a passkey. Cannot delete the user’s only passkey.Path Parameters
The unique identifier of the passkey to delete
Response
Returns true if the deletion was successful
Error Responses
404- Passkey not found or does not belong to the authenticated user400- Cannot delete your only passkey
Activity Log
Deleting a passkey logs apasskey_removed action with severity warning.
Trust Codes
Regenerate Trust Codes
Regenerate trust codes for account recovery. Deletes all existing trust codes and creates 2 new ones.Response
Array of 2 newly generated trust codes (plain text). These codes will never be shown again.
Activity Log
Regenerating trust codes logs atrust_codes_regenerated action with severity warning.
Security Questions (Deprecated)
Update Security Questions
Request Body
Array of 3 question/answer objects
Response
410- Security questions have been removed (error: “security_questions_removed”)