import { PasswordStrategy } from "./password.strategy"; import { OAuthStrategy } from "./oauth.strategy"; import type { IAuthStrategy } from "../../types/auth"; export { PasswordStrategy, OAuthStrategy }; export const strategyRegistry: Record = { password: new PasswordStrategy(), }; export function getStrategy(type: string): IAuthStrategy { const s = strategyRegistry[type]; if (!s) throw new Error(`Unknown auth strategy: ${type}`); return s; }