Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Refactor two-factor auth setup in client (#70)
Leendert de Borst329281cd5301
diff --git a/src/AliasVault.Api/Controllers/AuthController.cs b/src/AliasVault.Api/Controllers/AuthController.csindex 0465983a0..c4d2ac37c 100644--- a/src/AliasVault.Api/Controllers/AuthController.cs+++ b/src/AliasVault.Api/Controllers/AuthController.cs@@ -220,6 +220,23 @@ public class AuthController(IDbContextFactory<AliasServerDbContext> dbContextFacreturn Ok(new TokenModel() { Token = token, RefreshToken = newRefreshToken });}+ /// <summary>+ /// Get two-factor authentication enabled status for a user.+ /// </summary>+ /// <returns>Task.</returns>+ [HttpGet("status-2fa")]+ public async Task<IActionResult> StatusTwoFactor()+ {+ var user = await userManager.GetUserAsync(User);+ if (user == null)+ {+ return NotFound();+ }++ var twoFactorEnabled = await userManager.GetTwoFactorEnabledAsync(user);+ return Ok(new { TwoFactorEnabled = twoFactorEnabled });+ }+/// <summary>/// Enable two-factor authentication for a user./// </summary>@@ -246,6 +263,32 @@ public class AuthController(IDbContextFactory<AliasServerDbContext> dbContextFacreturn Ok(new { Secret = authenticatorKey, QrCodeUrl = qrCodeUrl });}+ /// <summary>+ /// Disable two-factor authentication for a user.+ /// </summary>+ /// <returns>Task.</returns>+ [HttpPost("disable-2fa")]+ public async Task<IActionResult> DisableTwoFactor()+ {+ var user = await userManager.GetUserAsync(User);+ if (user == null)+ {+ return NotFound();+ }++ await using var context = await dbContextFactory.CreateDbContextAsync();++ // Disable 2FA and remove any existing authenticator key(s).+ await userManager.SetTwoFactorEnabledAsync(user, false);+ context.UserTokens.RemoveRange(+ context.UserTokens.Where(+ x => x.UserId == user.Id &&+ x.Name == "AuthenticatorKey").ToList());++ await context.SaveChangesAsync();+ return Ok();+ }+/// <summary>/// Verify two-factor authentication setup./// </summary>diff --git a/src/AliasVault.Client/Main/Layout/TopMenu.razor b/src/AliasVault.Client/Main/Layout/TopMenu.razorindex 719b6269f..70fbbd009 100644--- a/src/AliasVault.Client/Main/Layout/TopMenu.razor+++ b/src/AliasVault.Client/Main/Layout/TopMenu.razor@@ -46,7 +46,7 @@<a href="/settings/general" class="block py-2 px-4 text-sm hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-400 dark:hover:text-white">General settings</a></li><li>- <a href="/settings/totp" class="block py-2 px-4 text-sm hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-400 dark:hover:text-white">2FA settings</a>+ <a href="/settings/security" class="block py-2 px-4 text-sm hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-400 dark:hover:text-white">Security settings</a></li><li><a href="/settings/vault" class="block py-2 px-4 text-sm hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-400 dark:hover:text-white">Vault settings</a>diff --git a/src/AliasVault.Client/Main/Pages/Settings/Security/Disable2Fa.razor b/src/AliasVault.Client/Main/Pages/Settings/Security/Disable2Fa.razornew file mode 100644index 000000000..7bf0788f1--- /dev/null+++ b/src/AliasVault.Client/Main/Pages/Settings/Security/Disable2Fa.razor@@ -0,0 +1,87 @@+@page "/settings/security/disable-2fa"+@inherits MainBase+@inject HttpClient Http++<LayoutPageTitle>Disable two-factor authentication</LayoutPageTitle>++@if (IsLoading)+{+ <LoadingIndicator />+}+else+{++ <div class="grid grid-cols-1 px-4 pt-6 xl:grid-cols-3 xl:gap-4 dark:bg-gray-900">+ <div class="mb-4 col-span-full xl:mb-2">+ <Breadcrumb BreadcrumbItems="BreadcrumbItems"/>+ <h1 class="text-xl font-semibold text-gray-900 sm:text-2xl dark:text-white">Disable two-factor authentication</h1>+ <p class="mt-2 text-sm text-gray-600 dark:text-gray-400">Disabling two-factor authentication means you will be able to login with only your password.</p>+ </div>+ </div>++ <div class="p-4 mb-4 mx-4 bg-white border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 sm:p-6 dark:bg-gray-800">+ <AlertMessageError Message="Please note: after disabling two-factor authentication any configured authenticator app(s) will stop working. When you want to re-enable two-factor authentication you will have to configure the authenticator app(s) again." />+ <div class="mb-3 text-sm text-gray-600 dark:text-gray-400">Two factor authentication is currently enabled. Disable it in order to be able to access your vault with your password only.</div>+ <button @onclick="DisableTwoFactor"+ class="bg-red-500 text-white py-2 px-4 rounded-md hover:bg-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 transition duration-150 ease-in-out">+ Disable Two-Factor Authentication+ </button>+ </div>+}++@code {+ private bool IsLoading { get; set; } = true;++ /// <inheritdoc />+ protected override async Task OnInitializedAsync()+ {+ await base.OnInitializedAsync();++ BreadcrumbItems.Add(new BreadcrumbItem { DisplayName = "Security settings", Url = "/settings/security" });+ BreadcrumbItems.Add(new BreadcrumbItem { DisplayName = "Disable two-factor authentication" });+ }++ /// <inheritdoc />+ protected override async Task OnAfterRenderAsync(bool firstRender)+ {+ await base.OnAfterRenderAsync(firstRender);++ // Check on server if 2FA is enabled+ if (firstRender)+ {+ var response = await Http.GetFromJsonAsync<TwoFactorEnabledResult>("api/v1/Auth/status-2fa");+ if (response is not null)+ {+ if (!response.TwoFactorEnabled)+ {+ GlobalNotificationService.AddErrorMessage("Two-factor authentication is not enabled.");+ NavigationManager.NavigateTo("/settings/security");+ return;+ }+ }++ IsLoading = false;+ StateHasChanged();+ }+ }++ private async Task DisableTwoFactor()+ {+ var response = await Http.PostAsync("api/v1/Auth/disable-2fa", null);+ if (response.IsSuccessStatusCode)+ {+ GlobalNotificationService.AddSuccessMessage("Two-factor authentication is now successfully disabled.");+ NavigationManager.NavigateTo("/settings/security");+ return;+ }++ // Handle error+ GlobalNotificationService.AddErrorMessage("Failed to disable two-factor authentication.", true);+ StateHasChanged();+ }++ private class TwoFactorEnabledResult+ {+ public bool TwoFactorEnabled { get; set; }+ }+}diff --git a/src/AliasVault.Client/Main/Pages/Settings/Security/Enable2Fa.razor b/src/AliasVault.Client/Main/Pages/Settings/Security/Enable2Fa.razornew file mode 100644index 000000000..7c8ea2bf5--- /dev/null+++ b/src/AliasVault.Client/Main/Pages/Settings/Security/Enable2Fa.razor@@ -0,0 +1,117 @@+@page "/settings/security/enable-2fa"+@inherits MainBase+@inject HttpClient Http++<LayoutPageTitle>Enable two-factor authentication</LayoutPageTitle>++@if (IsLoading)+{+ <LoadingIndicator />+}+else+{+ <div class="grid grid-cols-1 px-4 pt-6 xl:grid-cols-3 xl:gap-4 dark:bg-gray-900">+ <div class="mb-4 col-span-full xl:mb-2">+ <Breadcrumb BreadcrumbItems="BreadcrumbItems"/>+ <h1 class="text-xl font-semibold text-gray-900 sm:text-2xl dark:text-white">Enable two-factor authentication</h1>+ <p class="mt-2 text-sm text-gray-600 dark:text-gray-400">Enable two-factor authentication to increase the security of your vaults.</p>+ </div>+ </div>++ <div class="p-4 mb-4 mx-4 bg-white border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 sm:p-6 dark:bg-gray-800">+ <div class="space-y-6">+ <div id="authenticator-uri" data-url="@QrCodeUrl" class="flex justify-center">+ <!-- QR code will be rendered here -->+ </div>++ <p class="text-sm text-gray-600 text-center">+ Scan this QR code with your authenticator app or enter the following secret manually:+ </p>+ <div class="text-lg font-mono text-center bg-gray-100 p-2 rounded" id="authenticator-secret">@Secret</div>++ <EditForm Model="@VerifyModel" OnValidSubmit="@VerifySetup" class="space-y-4">+ <div>+ <InputText id="verificationCode" @bind-Value="VerifyModel.Code"+ class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"+ placeholder="Enter verification code"/>+ </div>+ <button type="submit"+ class="w-full bg-primary-500 text-white py-2 px-4 rounded-md hover:bg-primary-600 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 transition duration-150 ease-in-out">+ Verify and Enable+ </button>+ </EditForm>+ </div>+ </div>+}++@code {+ private string QrCodeUrl { get; set; } = string.Empty;+ private string Secret { get; set; } = string.Empty;+ private VerificationModel VerifyModel = new();+ private bool IsLoading { get; set; } = true;++ /// <inheritdoc />+ protected override async Task OnInitializedAsync()+ {+ await base.OnInitializedAsync();++ BreadcrumbItems.Add(new BreadcrumbItem { DisplayName = "Security settings", Url = "/settings/security" });+ BreadcrumbItems.Add(new BreadcrumbItem { DisplayName = "Enable two-factor authentication" });+ }++ /// <inheritdoc />+ protected override async Task OnAfterRenderAsync(bool firstRender)+ {+ await base.OnAfterRenderAsync(firstRender);++ // Check on server if 2FA is enabled+ if (firstRender)+ {+ // Get the QR code and secret for the authenticator app.+ var response = await Http.PostAsync("api/v1/Auth/enable-2fa", null);+ if (response.IsSuccessStatusCode)+ {+ var result = await response.Content.ReadFromJsonAsync<TotpSetupResult>();++ if (result != null)+ {+ QrCodeUrl = result.QrCodeUrl;+ Secret = result.Secret;+ IsLoading = false;+ StateHasChanged();+ JsInteropService.GenerateQrCode("authenticator-uri");+ }+ }++ IsLoading = false;+ StateHasChanged();+ }+ }++ private async Task VerifySetup()+ {+ var response = await Http.PostAsJsonAsync("api/v1/Auth/verify-2fa", VerifyModel.Code);+ if (response.IsSuccessStatusCode)+ {+ GlobalNotificationService.AddSuccessMessage("Two-factor authentication is now successfully enabled. On your " ++ "next login you will need to enter your 2FA code.");+ NavigationManager.NavigateTo("/settings/security");+ }+ else+ {+ GlobalNotificationService.AddErrorMessage("Failed to enable two-factor authentication.", true);+ StateHasChanged();+ }+ }++ private class TotpSetupResult+ {+ public string Secret { get; set; } = string.Empty;+ public string QrCodeUrl { get; set; } = string.Empty;+ }++ private class VerificationModel+ {+ public string Code { get; set; } = string.Empty;+ }+}diff --git a/src/AliasVault.Client/Main/Pages/Settings/Security/Security.razor b/src/AliasVault.Client/Main/Pages/Settings/Security/Security.razornew file mode 100644index 000000000..83a68b121--- /dev/null+++ b/src/AliasVault.Client/Main/Pages/Settings/Security/Security.razor@@ -0,0 +1,88 @@+@page "/settings/security"+@inherits MainBase+@inject HttpClient Http++<LayoutPageTitle>Security settings</LayoutPageTitle>++@if (IsLoading)+{+ <LoadingIndicator />+}+else+{+ <div class="grid grid-cols-1 px-4 pt-6 xl:grid-cols-3 xl:gap-4 dark:bg-gray-900">+ <div class="mb-4 col-span-full xl:mb-2">+ <Breadcrumb BreadcrumbItems="BreadcrumbItems"/>+ <h1 class="text-xl font-semibold text-gray-900 sm:text-2xl dark:text-white">Security settings</h1>+ <p class="mt-2 text-sm text-gray-600 dark:text-gray-400">Configure security settings.</p>+ </div>+ </div>++ <div class="p-4 mb-4 mx-4 bg-white border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 sm:p-6 dark:bg-gray-800">+ <h3 class="mb-4 text-lg font-medium text-gray-900 dark:text-white">Two-factor authentication</h3>++ @if (TwoFactorEnabled)+ {+ <div class="mb-3 text-sm text-gray-600 dark:text-gray-400">Two factor authentication is currently enabled.</div>+ <button @onclick="DisableTwoFactor"+ class="bg-red-500 text-white py-2 px-4 rounded-md hover:bg-red-600 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 transition duration-150 ease-in-out">+ Disable Two-Factor Authentication+ </button>+ }+ else+ {+ <div class="mb-3 text-sm text-gray-600 dark:text-gray-400">Two factor authentication is currently disabled. In order to improve your account security we advise you to enable it.</div>+ <button @onclick="EnableTwoFactor"+ class="bg-green-500 text-white py-2 px-4 rounded-md hover:bg-green-600 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 transition duration-150 ease-in-out">+ Enable Two-Factor Authentication+ </button>+ }+ </div>+}++@code {+ private bool TwoFactorEnabled { get; set; }+ private bool IsLoading { get; set; } = true;++ /// <inheritdoc />+ protected override async Task OnInitializedAsync()+ {+ await base.OnInitializedAsync();++ BreadcrumbItems.Add(new BreadcrumbItem { DisplayName = "Security settings" });+ }++ /// <inheritdoc />+ protected override async Task OnAfterRenderAsync(bool firstRender)+ {+ await base.OnAfterRenderAsync(firstRender);++ // Check on server if 2FA is enabled+ if (firstRender)+ {+ var response = await Http.GetFromJsonAsync<TwoFactorEnabledResult>("api/v1/Auth/status-2fa");+ if (response is not null)+ {+ TwoFactorEnabled = response.TwoFactorEnabled;+ }++ IsLoading = false;+ StateHasChanged();+ }+ }++ private void EnableTwoFactor()+ {+ NavigationManager.NavigateTo("settings/security/enable-2fa");+ }++ private void DisableTwoFactor()+ {+ NavigationManager.NavigateTo("settings/security/disable-2fa");+ }++ private class TwoFactorEnabledResult+ {+ public bool TwoFactorEnabled { get; set; }+ }+}diff --git a/src/AliasVault.Client/Main/Pages/Settings/Totp.razor b/src/AliasVault.Client/Main/Pages/Settings/Totp.razordeleted file mode 100644index 1765ef83e..000000000--- a/src/AliasVault.Client/Main/Pages/Settings/Totp.razor+++ /dev/null@@ -1,91 +0,0 @@-@page "/settings/totp"-@inherits MainBase-@inject HttpClient Http--<div class="max-w-md mx-auto mt-10 p-6 bg-white rounded-lg shadow-md">- <h3 class="text-2xl font-bold text-gray-800 mb-6">Set Up Two-Factor Authentication</h3>-- @if (!string.IsNullOrEmpty(QrCodeUrl))- {- <div class="space-y-6">- <div id="authenticator-uri" data-url="@QrCodeUrl" class="flex justify-center">- <!-- QR code will be rendered here -->- </div>-- <p class="text-sm text-gray-600 text-center">- Scan this QR code with your authenticator app or enter the following secret manually:- </p>- <div class="text-lg font-mono text-center bg-gray-100 p-2 rounded" id="authenticator-secret">@Secret</div>-- <EditForm Model="@VerifyModel" OnValidSubmit="@VerifySetup" class="space-y-4">- <div>- <InputText id="verificationCode" @bind-Value="VerifyModel.Code"- class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"- placeholder="Enter verification code" />- </div>- <button type="submit"- class="w-full bg-blue-500 text-white py-2 px-4 rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition duration-150 ease-in-out">- Verify and Enable- </button>- </EditForm>- </div>- }- else- {- <button @onclick="EnableTwoFactor"- class="w-full bg-green-500 text-white py-2 px-4 rounded-md hover:bg-green-600 focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 transition duration-150 ease-in-out">- Enable Two-Factor Authentication- </button>- }-</div>--@code {- private string QrCodeUrl { get; set; } = string.Empty;- private string Secret { get; set; } = string.Empty;- private VerificationModel VerifyModel = new();-- private async Task EnableTwoFactor()- {- var response = await Http.PostAsync("api/v1/Auth/enable-2fa", null);- if (response.IsSuccessStatusCode)- {- var result = await response.Content.ReadFromJsonAsync<TotpSetupResult>();-- if (result != null)- {- QrCodeUrl = result.QrCodeUrl;- Secret = result.Secret;- StateHasChanged();- JsInteropService.GenerateQrCode("authenticator-uri");- }- }- }-- private async Task VerifySetup()- {- var response = await Http.PostAsJsonAsync("api/v1/Auth/verify-2fa", VerifyModel.Code);- if (response.IsSuccessStatusCode)- {- // TOTP setup successful- // You might want to navigate the user or show a success message- GlobalNotificationService.AddSuccessMessage("Two-factor authentication is now successfully enabled. On your " +- "next login you will need to enter your 2FA code.");- NavigationManager.NavigateTo("/settings/general");- }- else- {- // Handle error- }- }-- private class TotpSetupResult- {- public string Secret { get; set; } = string.Empty;- public string QrCodeUrl { get; set; } = string.Empty;- }-- private class VerificationModel- {- public string Code { get; set; } = string.Empty;- }-}diff --git a/src/AliasVault.Client/wwwroot/css/tailwind.css b/src/AliasVault.Client/wwwroot/css/tailwind.cssindex d70a44b3e..889e4a575 100644--- a/src/AliasVault.Client/wwwroot/css/tailwind.css+++ b/src/AliasVault.Client/wwwroot/css/tailwind.css@@ -797,10 +797,6 @@ video {margin-top: 2rem;}-.mt-10 {- margin-top: 2.5rem;-}-.line-clamp-2 {overflow: hidden;display: -webkit-box;@@ -1214,6 +1210,11 @@ video {border-top-width: 1px;}+.border-amber-200 {+ --tw-border-opacity: 1;+ border-color: rgb(253 230 138 / var(--tw-border-opacity));+}+.border-blue-700 {--tw-border-opacity: 1;border-color: rgb(29 78 216 / var(--tw-border-opacity));@@ -1254,9 +1255,9 @@ video {border-color: rgb(186 230 253 / var(--tw-border-opacity));}-.border-amber-200 {- --tw-border-opacity: 1;- border-color: rgb(253 230 138 / var(--tw-border-opacity));+.bg-amber-50 {+ --tw-bg-opacity: 1;+ background-color: rgb(255 251 235 / var(--tw-bg-opacity));}.bg-blue-500 {@@ -1314,6 +1315,11 @@ video {background-color: rgb(240 253 244 / var(--tw-bg-opacity));}+.bg-green-500 {+ --tw-bg-opacity: 1;+ background-color: rgb(34 197 94 / var(--tw-bg-opacity));+}+.bg-green-600 {--tw-bg-opacity: 1;background-color: rgb(22 163 74 / var(--tw-bg-opacity));@@ -1344,29 +1350,29 @@ video {background-color: rgb(254 242 242 / var(--tw-bg-opacity));}-.bg-red-600 {+.bg-red-500 {--tw-bg-opacity: 1;- background-color: rgb(220 38 38 / var(--tw-bg-opacity));+ background-color: rgb(239 68 68 / var(--tw-bg-opacity));}-.bg-white {+.bg-red-600 {--tw-bg-opacity: 1;- background-color: rgb(255 255 255 / var(--tw-bg-opacity));+ background-color: rgb(220 38 38 / var(--tw-bg-opacity));}-.bg-green-500 {+.bg-sky-50 {--tw-bg-opacity: 1;- background-color: rgb(34 197 94 / var(--tw-bg-opacity));+ background-color: rgb(240 249 255 / var(--tw-bg-opacity));}-.bg-sky-50 {+.bg-white {--tw-bg-opacity: 1;- background-color: rgb(240 249 255 / var(--tw-bg-opacity));+ background-color: rgb(255 255 255 / var(--tw-bg-opacity));}-.bg-amber-50 {+.bg-primary-500 {--tw-bg-opacity: 1;- background-color: rgb(255 251 235 / var(--tw-bg-opacity));+ background-color: rgb(244 149 65 / var(--tw-bg-opacity));}.bg-opacity-50 {@@ -1614,6 +1620,11 @@ video {letter-spacing: 0.05em;}+.text-amber-700 {+ --tw-text-opacity: 1;+ color: rgb(180 83 9 / var(--tw-text-opacity));+}+.text-blue-500 {--tw-text-opacity: 1;color: rgb(59 130 246 / var(--tw-text-opacity));@@ -1699,19 +1710,14 @@ video {color: rgb(239 68 68 / var(--tw-text-opacity));}-.text-red-800 {- --tw-text-opacity: 1;- color: rgb(153 27 27 / var(--tw-text-opacity));-}--.text-white {+.text-red-600 {--tw-text-opacity: 1;- color: rgb(255 255 255 / var(--tw-text-opacity));+ color: rgb(220 38 38 / var(--tw-text-opacity));}-.text-red-600 {+.text-red-800 {--tw-text-opacity: 1;- color: rgb(220 38 38 / var(--tw-text-opacity));+ color: rgb(153 27 27 / var(--tw-text-opacity));}.text-sky-700 {@@ -1719,9 +1725,9 @@ video {color: rgb(3 105 161 / var(--tw-text-opacity));}-.text-amber-700 {+.text-white {--tw-text-opacity: 1;- color: rgb(180 83 9 / var(--tw-text-opacity));+ color: rgb(255 255 255 / var(--tw-text-opacity));}.opacity-25 {@@ -1846,6 +1852,11 @@ video {background-color: rgb(31 41 55 / var(--tw-bg-opacity));}+.hover\:bg-green-600:hover {+ --tw-bg-opacity: 1;+ background-color: rgb(22 163 74 / var(--tw-bg-opacity));+}+.hover\:bg-green-700:hover {--tw-bg-opacity: 1;background-color: rgb(21 128 61 / var(--tw-bg-opacity));@@ -1871,6 +1882,11 @@ video {background-color: rgb(154 93 38 / var(--tw-bg-opacity));}+.hover\:bg-red-600:hover {+ --tw-bg-opacity: 1;+ background-color: rgb(220 38 38 / var(--tw-bg-opacity));+}+.hover\:bg-red-700:hover {--tw-bg-opacity: 1;background-color: rgb(185 28 28 / var(--tw-bg-opacity));@@ -1881,9 +1897,9 @@ video {background-color: rgb(153 27 27 / var(--tw-bg-opacity));}-.hover\:bg-green-600:hover {+.hover\:bg-primary-600:hover {--tw-bg-opacity: 1;- background-color: rgb(22 163 74 / var(--tw-bg-opacity));+ background-color: rgb(214 131 56 / var(--tw-bg-opacity));}.hover\:from-primary-600:hover {@@ -1997,6 +2013,11 @@ video {--tw-ring-color: rgb(134 239 172 / var(--tw-ring-opacity));}+.focus\:ring-green-500:focus {+ --tw-ring-opacity: 1;+ --tw-ring-color: rgb(34 197 94 / var(--tw-ring-opacity));+}+.focus\:ring-primary-300:focus {--tw-ring-opacity: 1;--tw-ring-color: rgb(248 185 99 / var(--tw-ring-opacity));@@ -2007,19 +2028,19 @@ video {--tw-ring-color: rgb(244 149 65 / var(--tw-ring-opacity));}-.focus\:ring-red-300:focus {+.focus\:ring-primary-600:focus {--tw-ring-opacity: 1;- --tw-ring-color: rgb(252 165 165 / var(--tw-ring-opacity));+ --tw-ring-color: rgb(214 131 56 / var(--tw-ring-opacity));}-.focus\:ring-green-500:focus {+.focus\:ring-red-300:focus {--tw-ring-opacity: 1;- --tw-ring-color: rgb(34 197 94 / var(--tw-ring-opacity));+ --tw-ring-color: rgb(252 165 165 / var(--tw-ring-opacity));}-.focus\:ring-primary-600:focus {+.focus\:ring-red-500:focus {--tw-ring-opacity: 1;- --tw-ring-color: rgb(214 131 56 / var(--tw-ring-opacity));+ --tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity));}.focus\:ring-offset-2:focus {@@ -2037,6 +2058,11 @@ video {border-color: rgb(75 85 99 / var(--tw-divide-opacity));}+.dark\:border-amber-800:is(.dark *) {+ --tw-border-opacity: 1;+ border-color: rgb(146 64 14 / var(--tw-border-opacity));+}+.dark\:border-blue-500:is(.dark *) {--tw-border-opacity: 1;border-color: rgb(59 130 246 / var(--tw-border-opacity));@@ -2057,11 +2083,6 @@ video {border-color: rgb(7 89 133 / var(--tw-border-opacity));}-.dark\:border-amber-800:is(.dark *) {- --tw-border-opacity: 1;- border-color: rgb(146 64 14 / var(--tw-border-opacity));-}-.dark\:bg-gray-600:is(.dark *) {--tw-bg-opacity: 1;background-color: rgb(75 85 99 / var(--tw-bg-opacity));@@ -2121,6 +2142,11 @@ video {--tw-gradient-to: #f49541 var(--tw-gradient-to-position);}+.dark\:text-amber-300:is(.dark *) {+ --tw-text-opacity: 1;+ color: rgb(252 211 77 / var(--tw-text-opacity));+}+.dark\:text-blue-400:is(.dark *) {--tw-text-opacity: 1;color: rgb(96 165 250 / var(--tw-text-opacity));@@ -2166,19 +2192,14 @@ video {color: rgb(248 113 113 / var(--tw-text-opacity));}-.dark\:text-white:is(.dark *) {- --tw-text-opacity: 1;- color: rgb(255 255 255 / var(--tw-text-opacity));-}-.dark\:text-sky-300:is(.dark *) {--tw-text-opacity: 1;color: rgb(125 211 252 / var(--tw-text-opacity));}-.dark\:text-amber-300:is(.dark *) {+.dark\:text-white:is(.dark *) {--tw-text-opacity: 1;- color: rgb(252 211 77 / var(--tw-text-opacity));+ color: rgb(255 255 255 / var(--tw-text-opacity));}.dark\:placeholder-gray-400:is(.dark *)::-moz-placeholder {diff --git a/src/Tests/AliasVault.E2ETests/Tests/Client/TwoFactorAuthTests.cs b/src/Tests/AliasVault.E2ETests/Tests/Client/TwoFactorAuthTests.csindex ee35c1c11..fcdd3fc92 100644--- a/src/Tests/AliasVault.E2ETests/Tests/Client/TwoFactorAuthTests.cs+++ b/src/Tests/AliasVault.E2ETests/Tests/Client/TwoFactorAuthTests.cs@@ -23,8 +23,8 @@ public class TwoFactorAuthTests : ClientPlaywrightTestpublic async Task Setup2FactorAuthAndLogin(){// Setup two factor auth.- await NavigateUsingBlazorRouter("settings/totp");- await WaitForUrlAsync("settings/totp", "Set Up Two-Factor Authentication");+ await NavigateUsingBlazorRouter("settings/security");+ await WaitForUrlAsync("settings/security", "Two-factor Authentication");// Press the enable button with text "Enable Two-Factor Authentication"var enableButton = Page.Locator("button:has-text('Enable Two-Factor Authentication')");@@ -96,7 +96,5 @@ public class TwoFactorAuthTests : ClientPlaywrightTest// Check if we get redirected to the index page.await WaitForUrlAsync(AppBaseUrl, "Welcome to AliasVault");-- await Task.Delay(5000);}}