Skip to main content

IsTrustedDeviceResponseDTO

Package: @nauth-toolkit/core Type: DTO (Response)

Response data transfer object for checking if the current device is trusted.

import { IsTrustedDeviceResponseDTO } from '@nauth-toolkit/nestjs';

Properties

PropertyTypeDescription
trustedbooleanWhether 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

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 false if:
    • No device token exists
    • Device token is invalid or tampered
    • Trust has expired
    • Trusted device feature is disabled