From 8fafea605667c706881441441971f4ca0a212e6c Mon Sep 17 00:00:00 2001 From: Jake Fink Date: Wed, 17 Jul 2024 15:30:29 -0400 Subject: [PATCH] disable verification on send-email and reenable on put email --- src/Api/Auth/Controllers/TwoFactorController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Api/Auth/Controllers/TwoFactorController.cs b/src/Api/Auth/Controllers/TwoFactorController.cs index b287b2f1d5..64ff6588ce 100644 --- a/src/Api/Auth/Controllers/TwoFactorController.cs +++ b/src/Api/Auth/Controllers/TwoFactorController.cs @@ -296,7 +296,7 @@ public class TwoFactorController : Controller [HttpPost("send-email")] public async Task SendEmail([FromBody] TwoFactorEmailRequestModel model) { - var user = await CheckAsync(model, false); + var user = await CheckAsync(model, false, false); model.ToUser(user); await _userService.SendTwoFactorEmailAsync(user); } @@ -349,7 +349,7 @@ public class TwoFactorController : Controller [HttpPost("email")] public async Task PutEmail([FromBody] UpdateTwoFactorEmailRequestModel model) { - var user = await CheckAsync(model, false, false); + var user = await CheckAsync(model, false); model.ToUser(user); if (!await _userManager.VerifyTwoFactorTokenAsync(user,