Device Serializer
serializers/device.md Device Serializer
Description
Tracks and manages user devices for login and trusted device features in Two-Factor Authentication.
Fields
| Field | Description | Required |
|---|---|---|
two_factor_auth |
Reference to the user's Two-Factor Authentication setup. | Yes |
device_uuid |
Unique identifier for the device. | Yes |
device_name |
Name of the device (e.g., "John's iPhone"). | Yes |
is_trusted |
Indicates whether the device is trusted. | No |
login_time |
Timestamp for login. | No |
last_used |
Timestamp for last usage. | No |
created_at |
Timestamp when the device entry was created. | No |
updated_at |
Timestamp when the device entry was last modified. | No |
Examples
Request Payload:
{
"two_factor_auth": 1,
"device_uuid": "unique-device-id",
"device_name": "Laptop",
"is_trusted": true
}