Authentication Utilities for Sovereign Node Operations
This module provides comprehensive JWT token management and password security utilities
for the WayrApp platform's authentication system. It serves as the core authentication
infrastructure supporting user login, token refresh, password hashing, and security
validation across the entire application.
The module implements industry-standard security practices including JWT token generation
with configurable expiration times, bcrypt password hashing with salt rounds, token
format validation, expiration checking, and secure random token generation. All functions
are designed to work seamlessly with the authentication middleware and controllers to
provide a robust, secure authentication system.
This utility module is extensively used by the AuthController for user authentication
operations, the authentication middleware for token verification, and various other
components throughout the application that require secure token handling and password
management capabilities.
Author
Exequiel Trujillo
Since
1.0.0
Example
// Generate token pair for user authentication import { generateTokenPair } from'@/shared/utils/auth';
if (token && validateTokenFormat(token) && !isTokenExpired(token)) { // Token is valid and not expired console.log('Token is ready for verification'); }
Authentication Utilities for Sovereign Node Operations
This module provides comprehensive JWT token management and password security utilities for the WayrApp platform's authentication system. It serves as the core authentication infrastructure supporting user login, token refresh, password hashing, and security validation across the entire application.
The module implements industry-standard security practices including JWT token generation with configurable expiration times, bcrypt password hashing with salt rounds, token format validation, expiration checking, and secure random token generation. All functions are designed to work seamlessly with the authentication middleware and controllers to provide a robust, secure authentication system.
This utility module is extensively used by the AuthController for user authentication operations, the authentication middleware for token verification, and various other components throughout the application that require secure token handling and password management capabilities.
Author
Exequiel Trujillo
Since
1.0.0
Example
Example
Example