Files
marechai/Marechai.Email/Templates/TwoFactorCodeEmailModel.cs
Natalia Portillo 064ede0ac4 Implement two-factor authentication (2FA) functionality
- Added two-factor authentication support in the login process, including handling for two-factor tokens and available methods.
- Enhanced the login page to manage two-factor verification and recovery codes.
- Introduced a security tab in the user profile for managing two-factor authentication settings, including enabling/disabling authenticator and email methods.
- Implemented backend services for managing two-factor authentication, including enabling/disabling methods and regenerating recovery codes.
- Added admin functionality to disable two-factor authentication for users.
- Updated UI components to reflect changes in two-factor authentication status and provide user feedback.
- Configured SMTP settings for email notifications related to two-factor authentication.
2026-05-08 16:07:39 +01:00

26 lines
1.1 KiB
C#

namespace Marechai.Email.Templates;
/// <summary>
/// Model for <c>Templates/TwoFactorCodeEmail.cshtml</c>. All user-visible strings are pre-localized by
/// <see cref="Composers.TwoFactorEmailComposer" /> using <c>IStringLocalizer&lt;Resources.EmailStrings&gt;</c>
/// so the Razor template stays culture-agnostic.
/// </summary>
public sealed class TwoFactorCodeEmailModel
{
public string AppName { get; set; } = "Marechai";
public string Code { get; set; } = string.Empty;
public int ExpiresInMinutes { get; set; } = 5;
/// <summary>Localized email title (h1).</summary>
public string Title { get; set; } = string.Empty;
/// <summary>Localized intro sentence beneath the title.</summary>
public string Intro { get; set; } = string.Empty;
/// <summary>Localized expiry sentence (already formatted with <see cref="ExpiresInMinutes" />).</summary>
public string Expiry { get; set; } = string.Empty;
/// <summary>Localized "ignore if you didn't try to sign in" footer.</summary>
public string Footer { get; set; } = string.Empty;
}