typebot.io/packages/auth/vitest.config.ts
Baptiste Arnaud 03c8dd967f
🐛 Harden email login codes (#2542)
- Add failed-attempt tracking to verification tokens in Prisma schemas
and the PostgreSQL migration.
- Record invalid email login code attempts with an atomic counter and
retire active login tokens after five failures.
- Mark Auth.js email login verification tokens separately from other
verification-token flows.
- Use cryptographically secure random six-digit email login codes.
- Add auth package Vitest coverage, including parallel failed-attempt
handling.
2026-06-27 15:36:28 +02:00

19 lines
478 B
TypeScript

import { defineConfig } from "vitest/config";
export default defineConfig(() => ({
root: __dirname,
cacheDir: "../../node_modules/.vite/packages/auth",
test: {
name: "@typebot.io/auth",
watch: false,
globals: true,
environment: "node",
include: ["{src,tests}/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
reporters: ["default"],
coverage: {
reportsDirectory: "./test-output/vitest/coverage",
provider: "v8",
},
},
}));