Skip to main content

AuthUser

Package: @nauth-toolkit/client Type: Response

Complete user profile returned from profile endpoints. Includes authentication status, MFA configuration, and account metadata.

import { AuthUser } from '@nauth-toolkit/client';

Properties

PropertyTypeDescription
idnumberInternal user ID
substringUser subject identifier (public ID)
emailstringUser email address
firstNamestring | nullUser first name
lastNamestring | nullUser last name
phonestring | nullPhone number in E.164 format (e.g., +14155551234)
isEmailVerifiedbooleanWhether email is verified
isPhoneVerifiedbooleanWhether phone is verified
mfaEnabledbooleanWhether MFA is enabled
preferredMfaMethodstring | nullPreferred MFA method ('sms', 'email', 'totp', 'passkey')
socialProvidersstring[]Linked social auth providers (e.g., ['google', 'apple'])
hasPasswordHashbooleanWhether user has a password set
sessionAuthMethodstring | nullHow the current session was authenticated (password, google, apple, facebook)
isActivebooleanWhether account is active
createdAtDateAccount creation timestamp
updatedAtDateLast update timestamp

Example

{
"id": 123,
"sub": "user_abc123",
"email": "user@example.com",
"firstName": "John",
"lastName": "Doe",
"phone": "+14155551234",
"isEmailVerified": true,
"isPhoneVerified": true,
"mfaEnabled": true,
"preferredMfaMethod": "totp",
"socialProviders": ["google"],
"hasPasswordHash": true,
"sessionAuthMethod": "google",
"isActive": true,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-15T12:30:00.000Z"
}

Used By