mirror of
https://github.com/baptisteArno/typebot.io.git
synced 2026-07-21 21:13:45 +08:00
- 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.
19 lines
478 B
TypeScript
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",
|
|
},
|
|
},
|
|
}));
|