update 解决谷歌验证开启秘钥丢失问题
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.m2pool.lease.service.impl;
|
||||
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.nacos.common.utils.StringUtils;
|
||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
||||
@@ -1045,11 +1046,7 @@ public class LeaseUserServiceImpl extends ServiceImpl<LeaseUserMapper, LeaseUser
|
||||
|
||||
// 根据邮箱查询是否已绑定
|
||||
UserGoogleAuthInfo info = leaseUserMapper.getUserInfoByEmail(email);
|
||||
|
||||
//已绑定 正常走关闭谷歌验证流程
|
||||
//校验gcode
|
||||
boolean gResult = GoogleAuthenticator.checkCode(info.getSecret(), vo.getGCode(), System.currentTimeMillis());
|
||||
if(!gResult){
|
||||
if(!GoogleAuthenticator.checkCode(info.getSecret(), vo.getGCode(), System.currentTimeMillis())){
|
||||
return Result.fail("谷歌验证码错误");
|
||||
}
|
||||
//校验邮箱验证码
|
||||
|
||||
Reference in New Issue
Block a user