godcrm/backend/routes/v3/auth/index.js
GOD CRM Release f89e074dd1
Some checks failed
CI / Lint / Typecheck / Test / Build (push) Has been cancelled
CI / PostgreSQL Integration Tests (push) Has been cancelled
GOD CRM — public scrubbed snapshot
Governed substrate for autonomous agents: scoped identity (passports),
audited actions, MCP workspace. Infra IPs and secrets redacted for public release.
2026-08-10 04:01:45 +03:00

34 lines
1.2 KiB
JavaScript

/**
* Auth routes index — assembles all sub-modules onto a single Express router.
*
* Sub-modules:
* - core.js — /register, /login, /logout, /me, /refresh, /password
* - profile.js — /profile, /avatar, /email
* - twoFactor.js — /2fa/setup, /2fa/verify, /2fa (DELETE)
* - passwordReset.js — /forgot-password, /verify-reset-token, /reset-password
* - googleOAuth.js — /google/*
*
* Shared helpers live in authShared.js.
*/
import express from 'express';
import registerCoreRoutes from './core.js';
import registerProfileRoutes from './profile.js';
import registerTwoFactorRoutes from './twoFactor.js';
import registerPasswordResetRoutes from './passwordReset.js';
import registerGoogleOAuthRoutes from './googleOAuth.js';
import registerTelegramOAuthRoutes from './telegramOAuth.js';
// Re-export requireAuth so external code can still do:
// import { requireAuth } from './routes/v3/auth.js'
export { requireAuth } from './authShared.js';
const router = express.Router();
registerCoreRoutes(router);
registerProfileRoutes(router);
registerTwoFactorRoutes(router);
registerPasswordResetRoutes(router);
registerGoogleOAuthRoutes(router);
registerTelegramOAuthRoutes(router);
export default router;