Skip to main content

Auth

Handles user registration, login, and password management using Firebase.

🗂️ Structure

auth/
├── controllers/
│ └── AuthController.ts # API routes for signup/login/password
├── services/
│ └── FirebaseAuthService.ts # Core auth logic using Firebase SDK
├── interfaces/
│ └── IAuthService.ts # Contract for auth service
├── classes/
│ └── validators/
│ └── AuthValidators.ts # Input DTOs with validation
├── types.ts # Inversify DI tokens
└── container.ts # DI bindings

🔐 Key Features

  • Signup/Login (email-password & Google)
  • Change Password (authenticated users only)
  • Firebase Integration for identity/auth token management
  • DTO Validation with class-validator
  • Secure, modular design with interfaces + DI

🔁 Workflow

  • AuthController receives request → validates DTO
  • Delegates to IAuthService (implemented by FirebaseAuthService)
  • Firebase handles credentials; app DB handles user profiles/invites
  • Response returned to client with minimal logic in controller