mirror of
https://github.com/certd/certd.git
synced 2026-05-15 20:47:31 +08:00
perf: 增加找回密码的验证码可重试次数 @nicheng-he (#496)
2.找回密码邮件方式增加长度到6位 3.开启自主找回密码放置更合适的位置
This commit is contained in:
@@ -28,6 +28,8 @@ export class LoginController extends BaseController {
|
||||
if(!sysSettings.selfServicePasswordRetrievalEnabled) {
|
||||
throw new CommonException('暂未开启自助找回');
|
||||
}
|
||||
// 找回密码的验证码允许错误次数
|
||||
const errorNum = 5;
|
||||
|
||||
if(body.type === 'email') {
|
||||
this.codeService.checkEmailCode({
|
||||
@@ -35,6 +37,7 @@ export class LoginController extends BaseController {
|
||||
email: body.input,
|
||||
randomStr: body.randomStr,
|
||||
validateCode: body.validateCode,
|
||||
errorNum,
|
||||
throwError: true,
|
||||
});
|
||||
} else if(body.type === 'mobile') {
|
||||
@@ -44,6 +47,7 @@ export class LoginController extends BaseController {
|
||||
randomStr: body.randomStr,
|
||||
phoneCode: body.phoneCode,
|
||||
smsCode: body.validateCode,
|
||||
errorNum,
|
||||
throwError: true,
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user