浏览代码

fix: add conditional password confirmation on signup

Password confirmation during signup is now only enforced if the 'enable_signup_password_confirmation' feature flag is enabled in the config. This allows for more flexible signup flows based on configuration.
Andrew Baek 2 月之前
父节点
当前提交
c1ba289ab5
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/routes/auth/+page.svelte

+ 5 - 3
src/routes/auth/+page.svelte

@@ -64,9 +64,11 @@
 	};
 
 	const signUpHandler = async () => {
-		if (password !== confirmPassword) {
-			toast.error($i18n.t('Passwords do not match.'));
-			return;
+		if ($config?.features?.enable_signup_password_confirmation) {
+			if (password !== confirmPassword) {
+				toast.error($i18n.t('Passwords do not match.'));
+				return;
+			}
 		}
 
 		const sessionUser = await userSignUp(name, email, password, generateInitialsImage(name)).catch(