chore: reset two-factor authentication after changing admin credentials

This commit is contained in:
somebodywashere 2025-05-23 18:28:02 +03:00 committed by GitHub
parent 5546c27fea
commit 6ecdb6e03b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -185,7 +185,7 @@ reset_user() {
read -rp "Please set the login password [default is a random password]: " config_password
[[ -z $config_password ]] && config_password=$(date +%s%N | md5sum | cut -c 1-8)
read -rp "Are you sure you want to reset the two factor? (y/n): " twoFactorConfirm
read -rp "Do you want to disable currently configured two-factor authentication? (y/n): " twoFactorConfirm
if [[ $twoFactorConfirm != "y" && $twoFactorConfirm != "Y" ]]; then
/usr/local/x-ui/x-ui setting -username ${config_account} -password ${config_password} -resetTwoFactor false >/dev/null 2>&1
else