feat:添加验证码调试功能
- 在验证码服务中添加debugCodeInfo方法 - 在业务层添加debugVerificationCode调试接口 - 新增/auth/debug-verification-code调试端点 - 支持查看验证码详细状态信息(TTL、尝试次数等) - 便于开发和生产环境问题排查
This commit is contained in:
@@ -567,4 +567,16 @@ export class LoginCoreService {
|
||||
const phoneRegex = /^(\+\d{1,3}[- ]?)?\d{10,11}$/;
|
||||
return phoneRegex.test(str.replace(/\s/g, ''));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 调试验证码信息
|
||||
*
|
||||
* @param email 邮箱地址
|
||||
* @returns 调试信息
|
||||
*/
|
||||
async debugVerificationCode(email: string): Promise<any> {
|
||||
return await this.verificationService.debugCodeInfo(
|
||||
email,
|
||||
VerificationCodeType.EMAIL_VERIFICATION
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user