Fix some issues with signing in

This commit is contained in:
2025-09-05 12:41:27 -05:00
parent adef703f92
commit 5ca78bd92c
3 changed files with 40 additions and 25 deletions

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;