mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
[PM-17645] : update email for new email multi factor tokens (#5428)
* feat(newDeviceVerification) : Initial update to email * fix : email copying over extra whitespace when using keyboard short cuts * test : Fixing tests for new device verificaiton email format
This commit is contained in:
@ -288,12 +288,17 @@ public class TwoFactorController : Controller
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This endpoint is only used to set-up email two factor authentication.
|
||||
/// </summary>
|
||||
/// <param name="model">secret verification model</param>
|
||||
/// <returns>void</returns>
|
||||
[HttpPost("send-email")]
|
||||
public async Task SendEmail([FromBody] TwoFactorEmailRequestModel model)
|
||||
{
|
||||
var user = await CheckAsync(model, false, true);
|
||||
model.ToUser(user);
|
||||
await _userService.SendTwoFactorEmailAsync(user);
|
||||
await _userService.SendTwoFactorEmailAsync(user, false);
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
|
Reference in New Issue
Block a user