@@ -12,7 +12,7 @@ namespace IRaCIS.Application.Services
|
||||
Task<IResponseOutput<LoginReturnDTO>> Login(string userName, string password);
|
||||
Task<IResponseOutput> VerifyMFACodeAsync(Guid userId, string Code);
|
||||
|
||||
Task<IResponseOutput> SendMFAEmail(Guid userId, UserMFAType mfaType);
|
||||
Task<IResponseOutput> SendMFAEmail(Guid userId, int mfaType=0);
|
||||
Task<UserBasicInfo> GetUserBasicInfo(Guid userId,string pwd);
|
||||
Task<IResponseOutput> ModifyPassword(EditPasswordCommand editPwModel);
|
||||
Task<IResponseOutput> ResetPassword(Guid userId);
|
||||
|
||||
@@ -656,13 +656,13 @@ namespace IRaCIS.Application.Services
|
||||
/// <param name="mfaType"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
public async Task<IResponseOutput> SendMFAEmail(Guid userId, UserMFAType mfaType = UserMFAType.Login)
|
||||
public async Task<IResponseOutput> SendMFAEmail(Guid userId, int mfaType )
|
||||
{
|
||||
var userInfo = await _userRepository.Where(u => u.Id == userId).Select(t => new { t.FullName, t.EMail }).FirstOrDefaultAsync();
|
||||
|
||||
int verificationCode = new Random().Next(100000, 1000000);
|
||||
|
||||
await _mailVerificationService.SenMFAVerifyEmail(userId, userInfo.FullName, userInfo.EMail, verificationCode, mfaType);
|
||||
await _mailVerificationService.SenMFAVerifyEmail(userId, userInfo.FullName, userInfo.EMail, verificationCode, (UserMFAType)mfaType );
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user