fix : 12 to 6 for password

This commit is contained in:
2026-10-02 12:15:37 +07:00 Unverified
parent 96c27f8fc3
commit 724234a6f9
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -47,10 +47,10 @@ describe("actual administrator session boundary", () => {
mocks.session.mockResolvedValue(null);
await expect(requireAdmin()).rejects.toMatchObject({ status: 401 });
});
it("defaults accounts to user and requires strong new passwords", async () => {
it("defaults accounts to user and requires six-character new passwords", async () => {
(await import("./server")).getAuth();
const options = mocks.auth.mock.calls.at(-1)![0];
expect(options.emailAndPassword).toMatchObject({ disableSignUp: false, minPasswordLength: 12 });
expect(options.emailAndPassword).toMatchObject({ disableSignUp: false, minPasswordLength: 6 });
expect(options.plugins).toContainEqual({ defaultRole: "user" });
expect(options.rateLimit.customStorage.consume).toBeTypeOf("function");
expect(options.databaseHooks).toBeUndefined();