Files
gridpilot.gg/apps/website/lib/di/modules/auth.module.ts
2026-01-16 01:00:03 +01:00

23 lines
606 B
TypeScript

import { ContainerModule } from 'inversify';
import { AuthService } from '../../services/auth/AuthService';
import { SessionService } from '../../services/auth/SessionService';
import {
AUTH_SERVICE_TOKEN,
SESSION_SERVICE_TOKEN,
} from '../tokens';
export const AuthModule = new ContainerModule((options) => {
const bind = options.bind;
// Session Service
bind<SessionService>(SESSION_SERVICE_TOKEN)
.to(SessionService)
.inSingletonScope();
// Auth Service - now creates its own dependencies
bind<AuthService>(AUTH_SERVICE_TOKEN)
.to(AuthService)
.inSingletonScope();
});