Files
marechai/Marechai.Database/Migrations/20260508133400_AddTwoFactorMethodFlags.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

41 lines
1.1 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Marechai.Database.Migrations
{
/// <inheritdoc />
public partial class AddTwoFactorMethodFlags : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "TwoFactorViaAuthenticator",
table: "AspNetUsers",
type: "bit(1)",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "TwoFactorViaEmail",
table: "AspNetUsers",
type: "bit(1)",
nullable: false,
defaultValue: false);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "TwoFactorViaAuthenticator",
table: "AspNetUsers");
migrationBuilder.DropColumn(
name: "TwoFactorViaEmail",
table: "AspNetUsers");
}
}
}