Verify device
POST/auth/device-ownership-verification
Verify device
The verify device ownership endpoint allows users to confirm ownership of a new device by verifying a secret token sent to their registered email address. It requires the user's email, hashed password, device secret, and an email verification code. Upon successful validation, the endpoint updates the user's session, stores the device secret, and returns a user session object including tokens for authentication.
Request
- application/json
Body
required
deviceSecret stringrequired
email stringrequired
emailCode stringrequired
passwordHash stringrequired
sessionId stringrequired
Responses
- 200
- 400
- 401
- 500
Device ownership verified
- application/json
- Schema
- Example (from schema)
Schema
accessToken stringrequired
createdAt date-timerequired
device stringrequired
deviceCreatedAt date-timerequired
email stringrequired
hpkePubKey binarynullable
id uuidrequired
lastLogin date-timenullable
lastTransaction date-timenullable
nickname stringrequired
refreshToken stringrequired
status stringrequired
{
"accessToken": "string",
"createdAt": "2024-09-25T19:42:12.368Z",
"device": "string",
"deviceCreatedAt": "2024-09-25T19:42:12.368Z",
"email": "string",
"hpkePubKey": "string",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"lastLogin": "2024-09-25T19:42:12.368Z",
"lastTransaction": "2024-09-25T19:42:12.368Z",
"nickname": "string",
"refreshToken": "string",
"status": "string"
}
Invalid credentials
- text/plain
- Schema
Schema
string
Unauthorized
- text/plain
- Schema
Schema
string
Unexpected error
- text/plain
- Schema
Schema
string
Loading...