Skip to main content

User entity reference

Understand how user entities work in SecureAuth and what each attribute controls for authentication and access management.

💡 Why this matters
User entities determine how authentication works, what data gets stored, and how you can manage users across your applications.

What is a user entity

A user entity contains all the information SecureAuth stores about an individual user. This includes operational attributes that control authentication flows and optional custom attributes for your business needs.

Two types of attributes:

  • Operational attributes - Required by SecureAuth for authentication and user management
  • Custom attributes - Optional fields you define for business requirements

User Entity

Operational attributes

These attributes control how SecureAuth handles authentication and user management.

Status

Controls what actions a user can perform in your system.

StatusWhat it allowsWhen to use
newAccount activation onlyNew user registrations
activeFull authenticationNormal operational users
inactiveNo authenticationSuspended or temporary users
deletedNo actionsArchived users

Status flow rules:

  • Only new users can complete account activation
  • Only active users can authenticate
  • Administrators can change any user to inactive or new

Identifiers

Unique keys that identify users during authentication and API calls.

Identifier TypeFormatExampleUse Case
emailValid email formatuser@company.comEmail-based login
mobileE164 format+12345678901SMS authentication
uidASCII charactersuser123Custom username
externalASCII charactersemp_987654Integration with HR systems

Key rules:

  • Each identifier must be unique within a user population
  • Users can have multiple identifiers of different types
  • Identifiers serve as authentication usernames

Addresses

Contact information for verification codes and account recovery.

Address TypeFormatVerification RequiredPurpose
emailValid emailOptionalPassword reset, notifications
mobileE164 formatOptionalSMS codes, alerts

Verification states:

  • Verified addresses - Unique per population, used for account recovery
  • Unverified addresses - Can be shared between users, limited functionality

Address rules:

  • Verified addresses can only belong to one user per population
  • Unverified addresses can be shared between users
  • Address verification prevents account takeover

Credentials

Authentication methods stored for each user.

Credential TypeDescriptionUser Limit
passwordEncrypted password hashOne per user
webauthnFIDO2/WebAuthn keysOne per user

Security notes:

  • Users can have multiple credential types simultaneously
  • Only one password and one WebAuthn credential per user
  • Credentials are encrypted and cannot be retrieved in plain text

Timestamps

Track user account activity and changes.

TimestampTracksAdministrative Use
created_atAccount creationAudit trails, compliance
updated_atLast profile changeMonitoring user activity
status_updated_atStatus changesSecurity investigations

Custom attributes

Add business-specific data fields to user entities for your organization's needs.

Common examples:

  • Employee ID
  • Department
  • Role or permissions
  • Account numbers
  • Risk scores

⚠️ Security note: Avoid storing sensitive data like SSNs or payment information in custom attributes

Next step: Define custom user attributes →