IsTrustedDeviceResponseDTO
Package: @nauth-toolkit/core
Type: DTO (Response)
Response data transfer object for checking if the current device is trusted.
- NestJS
- Express
- Fastify
import { IsTrustedDeviceResponseDTO } from '@nauth-toolkit/nestjs';
import { IsTrustedDeviceResponseDTO } from '@nauth-toolkit/core';
import { IsTrustedDeviceResponseDTO } from '@nauth-toolkit/core';
Properties
| Property | Type | Description |
|---|---|---|
trusted | boolean | Whether the current device is trusted. True if the device has a valid trusted device token and trust has not expired. |
Example
{
"trusted": true
}
Used By
Related
- TrustDeviceResponseDTO - Response for trusting a device
- Trusted Device Feature - Guide on trusted devices
Notes
- Works in both cookies mode (reads from httpOnly cookie) and JSON mode (reads from X-Device-Token header)
- Performs server-side validation of the device token
- Returns
falseif:- No device token exists
- Device token is invalid or tampered
- Trust has expired
- Trusted device feature is disabled