Overview
TradeMaster Transactions supports multiple authentication providers to secure your platform. The system is built with flexibility in mind, allowing you to choose between Firebase Authentication and Auth0 based on your organizational needs.Authentication Providers
Firebase Authentication
Firebase is the primary authentication provider for TMT, offering comprehensive user management and session handling.Configuration
Configure Firebase in your application by setting up the Firebase config object:guards/firebase/Firebase.js
Supported Authentication Methods
Firebase authentication in TMT supports multiple sign-in methods:Email/Password
Traditional email and password authentication with secure password reset functionality.
Google OAuth
One-click sign-in with Google accounts using OAuth 2.0.
Facebook OAuth
Social authentication through Facebook Login.
Twitter OAuth
Sign in with Twitter credentials.
Implementation Details
The Firebase authentication context (FirebaseContext.js) handles:
- User Session Management: Automatic session tracking with
onAuthStateChanged - User Status Validation: Checks user status in Firestore (
u_clientscollection) - IP Tracking: Records last access IP and timestamp for security auditing
- Profile Data: Syncs user profile data from Firestore to the application state
Auth0 Integration
Auth0 provides enterprise-grade authentication with advanced security features.Configuration
Set up Auth0 inguards/auth0/Auth0Context.js:
Auth0 Features
Single Sign-On (SSO)
Single Sign-On (SSO)
Auth0 enables SSO across multiple applications, allowing users to authenticate once and access all connected services.
Multi-Factor Authentication
Multi-Factor Authentication
Add an extra layer of security with MFA options including SMS, authenticator apps, and email verification.
Social Connections
Social Connections
Enterprise Connections
Enterprise Connections
Support for SAML, LDAP, and Active Directory for enterprise authentication.
Authentication Flow
User Account Types
TMT supports different account types with varying levels of access:| Account Type | Description | Primary Use Case |
|---|---|---|
Administrador | Full platform access | System administrators |
Cliente | Client portal access | Event organizers and clients |
Coordinador | Event coordination | Event managers |
Contador | Financial access | Accounting team |
Soporte | Support access | Customer support staff |
Security Best Practices
Password Reset Flow
Firebase provides built-in password reset functionality:Session Management
User sessions are managed through Redux state and synchronized with Firebase:store/apps/auth/authSlice.js
IP Tracking and Audit Logs
TMT automatically tracks user access for security monitoring:Troubleshooting
Users Cannot Sign In
Users Cannot Sign In
- Verify Firebase/Auth0 configuration is correct
- Check that user’s
statusfield is set totruein Firestore - Ensure email is verified (if email verification is enabled)
- Check browser console for authentication errors
Session Expires Too Quickly
Session Expires Too Quickly
Adjust Firebase session duration in Firebase Console under Authentication > Settings > Session Management.
Social Login Not Working
Social Login Not Working
Next Steps
Permissions
Configure role-based access control with CASL
Platform Settings
Set up platform-wide configuration