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.
This commit is contained in:
Andrew Baek 2025-08-02 19:04:52 +04:00
parent 09e475f6cc
commit c1ba289ab5

View file

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