fix(auth): resolve credentials login SQLITE_CONSTRAINT_NOTNULL and relax password rules
Session creation failed with NOT NULL constraint on expires column due to invalid date propagation from duration parsing. Override adapter.createSession with validated insert, harden signIn callback, fix createDurationSchema for numeric-only values, and guard events.ts group insert. Also relaxes password complexity to suggestions-only (min 8 chars enforced), extracts shared UserCreatePasswordFields component, and fixes login form passing extra fields to signIn.
This commit is contained in:
21 files changed
+274
-86
No files matched your search
@@ -53,4 +53,12 @@ describe("comparePasswordsAsync should compare passwords correctly", () => {
|
||||
// Assert
|
||||
expect(result).toBe(false);
|
||||
});
|
||||
it("should return true for passwords with special characters like LoveHomarr<3", async () => {
|
||||
const password = "LoveHomarr<3";
|
||||
const hash = await hashPasswordAsync(password);
|
||||
|
||||
const result = await comparePasswordsAsync(password, hash);
|
||||
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user