Skip to main content

X404AuthResult

All authentication features return an X404AuthResult:

Field Descriptions

boolean
required
Whether authentication was successful
boolean
Whether user was already authenticated (token exists in localStorage)
string
JWT token (if successful). Automatically stored in localStorage
unknown
Additional data returned from the server
string
Error type if authentication failed
string
Human-readable error message
'bronze' | 'silver' | 'gold'
User’s tier (only for X404Tier feature)

Success Example

Error Example

Usage

Error Types

All authentication functions can return the following error types:

Token Storage

Each feature automatically stores its JWT token in localStorage with the following keys:
  • sjwt404_timelock - Timelock feature
  • sjwt404_blacklist - Blacklist feature
  • sjwt404_multitoken - MultiToken feature
  • sjwt404_activity - Activity feature
  • sjwt404_tier - Tier feature
  • sjwt404_nodebt - NoDebt feature
  • sjwt404_age - Age feature
Tokens persist across sessions and are automatically checked on subsequent authentication attempts.