mfa 登录逻辑遗漏
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
dd13eddfe3
commit
e4c3521b04
|
@ -221,9 +221,9 @@ namespace IRaCIS.Api.Controllers
|
|||
|
||||
if (_verifyConfig.CurrentValue.OpenLoginMFA)
|
||||
{
|
||||
//发版屏蔽
|
||||
|
||||
|
||||
//returnModel.Data.JWTStr = _tokenService.GetToken(IRaCISClaims.Create(returnModel.Data.BasicInfo));
|
||||
|
||||
|
||||
//MFA 发送邮件
|
||||
|
||||
|
@ -235,7 +235,17 @@ namespace IRaCIS.Api.Controllers
|
|||
|
||||
returnModel.Data.BasicInfo.EMail = hiddenEmail;
|
||||
|
||||
await _userService.SendMFAEmail(userId);
|
||||
//修改密码
|
||||
if (returnModel.Data.BasicInfo.IsFirstAdd)
|
||||
{
|
||||
returnModel.Data.JWTStr = _tokenService.GetToken(IRaCISClaims.Create(returnModel.Data.BasicInfo));
|
||||
}
|
||||
else
|
||||
{
|
||||
//正常登录才发送邮件
|
||||
await _userService.SendMFAEmail(userId);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
|
|
|
@ -45,6 +45,7 @@ partial class Program
|
|||
Directory.CreateDirectory(dtoPath);
|
||||
}
|
||||
#endregion
|
||||
|
||||
using (var context = new YourDbContext())
|
||||
{
|
||||
var model = context.Model;
|
||||
|
|
Loading…
Reference in New Issue