Fix some issues with signing in

This commit is contained in:
gib committed 2025-09-05 12:41:27 -05:00
1 parent adef703f92
commit 5ca78bd92c
3 files changed
+40 -25

No files matched your search

+4
View File
@@ -14,6 +14,10 @@ export const { auth, signIn, signOut, store, isAuthenticated } = convexAuth({
providers: [Password],
});
export const PASSWORD_MIN = 8;
export const PASSWORD_MAX = 100;
export const PASSWORD_REGEX = /^(?=.{8,100}$)(?!.*\s)(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[\p{P}\p{S}]).*$/u;
export const getUser = query(async (ctx) => {
const userId = await getAuthUserId(ctx);
if (!userId) return null;