1
0
mirror of https://github.com/bitwarden/server synced 2026-01-07 19:13:50 +00: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:
Ike
2025-02-21 11:12:31 -05:00
committed by GitHub
parent b66f255c5c
commit b00f11fc43
14 changed files with 214 additions and 38 deletions

View File

@@ -0,0 +1,25 @@
namespace Bit.Core.Models.Mail;
/// <summary>
/// This view model is used to set-up email two factor authentication, to log in with email two factor authentication,
/// and for new device verification.
/// </summary>
public class TwoFactorEmailTokenViewModel : BaseMailModel
{
public string Token { get; set; }
/// <summary>
/// This view model is used to also set-up email two factor authentication. We use this property to communicate
/// the purpose of the email, since it can be used for logging in and for setting up.
/// </summary>
public string EmailTotpAction { get; set; }
/// <summary>
/// When logging in with email two factor the account email may not be the same as the email used for two factor.
/// we want to show the account email in the email, so the user knows which account they are logging into.
/// </summary>
public string AccountEmail { get; set; }
public string TheDate { get; set; }
public string TheTime { get; set; }
public string TimeZone { get; set; }
public string DeviceIp { get; set; }
public string DeviceType { get; set; }
}

View File

@@ -1,6 +1,6 @@
namespace Bit.Core.Models.Mail;
public class EmailTokenViewModel : BaseMailModel
public class UserVerificationEmailTokenViewModel : BaseMailModel
{
public string Token { get; set; }
}