feat(user): add encryption algorithm and salt fields to User model for migrate

This commit is contained in:
Chang lue Tsen
2025-10-09 13:33:03 -04:00
parent de4386ff68
commit 8562734fde
14 changed files with 20 additions and 7 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ func (l *UserLoginLogic) UserLogin(req *types.UserLoginRequest) (resp *types.Log
}
// Verify password
if !tool.VerifyPassWord(req.Password, userInfo.Password) {
if !tool.MultiPasswordVerify(userInfo.Algo, userInfo.Salt, req.Password, userInfo.Password) {
return nil, errors.Wrapf(xerr.NewErrCode(xerr.UserPasswordError), "user password")
}
// Generate session id