This page will help you get started with qAuth.
QAuth
QAuth is a robust, multi-tenant authentication and authorization service. It provides comprehensive user management, role-based access control, and API key management capabilities.
Features
- 🔐 Multi-tenant authentication and authorization
- 👥 User management with role-based access control (RBAC)
- 🔑 API key management
- 📧 Email and SMS-based MFA
- 📨 Customizable email templates
- 🚀 Invitation system for user onboarding
- 🌍 Internationalization support (English/Arabic)
- 🔄 Redis caching for improved performance
- Authentication: JWT and API Keys
- MFA: Email/SMS OTP
API Documentation
Authentication Endpoints (/auth)
/auth)POST /auth/login- User loginPOST /auth/token/validate- Validate authentication tokenPOST /auth/forgot-password- Initiate password resetPOST /auth/reset-password- Reset passwordPOST /auth/change-password- Change passwordPOST /auth/verify-otp- Verify OTP codePOST /auth/token/refresh- Refresh access token
User Management (/organization/:org_id/users)
/organization/:org_id/users)POST /users- Create new userGET /users- List all usersGET /users/:id- Get user detailsPUT /users/:id- Update userDELETE /users/:id- Delete userPOST /users/search- Search users
Role Management (/organization/:org_id/roles)
/organization/:org_id/roles)POST /roles- Create roleGET /roles- List all rolesGET /roles/:id- Get role detailsPUT /roles/:id- Update roleDELETE /roles/:id- Delete rolePOST /roles/search- Search roles
Permission Management (/organization/:org_id/permissions)
/organization/:org_id/permissions)POST /permissions- Create permissionGET /permissions- List all permissionsGET /permissions/:id- Get permission detailsPUT /permissions/:id- Update permissionDELETE /permissions/:id- Delete permissionPOST /permissions/search- Search permissions
API Key Management (/organization/:org_id/apikeys)
/organization/:org_id/apikeys)POST /apikeys- Create API keyGET /apikeys- List all API keysGET /apikeys/:id- Get API key detailsDELETE /apikeys/:id- Delete API keyPOST /apikeys/validate- Validate API keyPOST /apikeys/search- Search API keys
Tenant Management (/tenant/:tenant_id)
/tenant/:tenant_id)POST /tenants- Create tenantGET /tenants- List all tenantsGET /tenants/:id- Get tenant detailsPUT /tenants/:id- Update tenantDELETE /tenants/:id- Delete tenantPOST /tenants/search- Search tenantsPOST /tenants/:id/api-keys- Create tenant API keyDELETE /tenants/:id/api-keys/:keyId- Delete tenant API key
Invitation Management (/organization/:org_id/invitations)
/organization/:org_id/invitations)POST /invitations/create- Create invitationGET /invitations/list- List invitationsPOST /invitations/cancel- Cancel invitationPOST /invitations/search- Search invitationsGET /invitations/verify/:token- Verify invitation token
Email Template Management (/tenant/:tenant_id/email-templates)
/tenant/:tenant_id/email-templates)POST /email-templates- Create templateGET /email-templates- List templatesPUT /email-templates/:id- Update templateDELETE /email-templates/:id- Delete templatePOST /email-templates/search- Search templatesPOST /email-templates/render- Render templatesrc/common/: Contains shared utilities, guards, and middleware used across the applicationsrc/config/: Configuration files for different environments and servicessrc/migrations/: Database migration files for schema updatessrc/modules/: Feature modules, each containing its own controllers, services, DTOs, and entitiessrc/seeds/: Database seed files for initial data setuptest/: Contains e2e tests and test configurationsdist/: Contains the compiled JavaScript code.env.*: Environment-specific configuration filespackage.json: Project metadata and dependenciestsconfig.json: TypeScript compiler configuration
Security Features
- JWT-based authentication
- API key authentication
- Role-based access control
- Multi-factor authentication
- Request validation
- SQL injection prevention
- XSS protection
