mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 20:35:19 +00:00
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:
parent
09e475f6cc
commit
c1ba289ab5
1 changed files with 5 additions and 3 deletions
|
|
@ -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) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue