+
+
+
diff --git a/src/AliasVault.Admin/Auth/Layout/AuthLayout.razor b/src/AliasVault.Admin/Auth/Layout/AuthLayout.razor
new file mode 100644
index 000000000..4a125b766
--- /dev/null
+++ b/src/AliasVault.Admin/Auth/Layout/AuthLayout.razor
@@ -0,0 +1,36 @@
+@inherits LayoutComponentBase
+@using AliasVault.Admin.Auth.Components
+@implements IDisposable
+@inject NavigationManager NavigationManager
+
+If you have forgotten your password, please consult with the server admin.
diff --git a/src/AliasVault.Admin/Auth/Pages/Lockout.razor b/src/AliasVault.Admin/Auth/Pages/Lockout.razor new file mode 100644 index 000000000..b7cbc5108 --- /dev/null +++ b/src/AliasVault.Admin/Auth/Pages/Lockout.razor @@ -0,0 +1,8 @@ +@page "/user/lockout" + +This account has been locked out, please try again later.
+Your login is protected with an authenticator app. Enter your authenticator code below.
++ Don't have access to your authenticator device? You can + log in with a recovery code. +
+ +@code { + private AdminUser user = default!; + + [SupplyParameterFromForm] private InputModel Input { get; set; } = new(); + + [SupplyParameterFromQuery] private string? ReturnUrl { get; set; } + + [SupplyParameterFromQuery] private bool RememberMe { get; set; } + + ///+ You have requested to log in with a recovery code. This login will not be remembered until you provide + an authenticator app code at log in or disable 2FA and log in again. +
++ Put these codes in a safe place. +
++ If you lose your device and don't have the recovery codes you will lose access to your account. +
+@recoveryCode
+ + This action only disables 2FA. +
++ Disabling 2FA does not change the keys used in authenticator apps. If you wish to change the key + used in an authenticator app you should reset your authenticator keys. +
+To use an authenticator app go through the following steps:
++ Download a two-factor authenticator app like Microsoft Authenticator for + Android and + iOS or + Google Authenticator for + Android and + iOS. +
+Scan the QR Code or enter this key @sharedKey into your two factor authenticator app. Spaces and casing do not matter.
+ ++ Once you have scanned the QR code or input the key above, your two factor authentication app will provide you + with a unique code. Enter the code in the confirmation box below. +
++ + Put these codes in a safe place. +
++ If you lose your device and don't have the recovery codes you will lose access to your account. +
++ Generating new recovery codes does not change the keys used in authenticator apps. If you wish to change the key + used in an authenticator app you should reset your authenticator keys. +
++ + If you reset your authenticator key your authenticator app will not work until you reconfigure it. +
++ This process disables 2FA until you verify your authenticator app. + If you do not complete your authenticator app configuration you may lose access to your account. +
+You have no recovery codes left.
+You must generate a new set of recovery codes before you can log in with a recovery code.
+You have 1 recovery code left.
+You can generate a new set of recovery codes.
+You have @recoveryCodesLeft recovery codes left.
+You should generate a new set of recovery codes.
+Manage your profile here.
+This page gives an overview of recently received mails by this AliasVault server.
+| ID | +Time | +From | +To | +Subject | +Preview | +Attachments | +
|---|---|---|---|---|---|---|
| @email.Id | +@email.DateSystem.ToString("yyyy-MM-dd HH:mm") | ++ @email.FromLocal@@@email.FromDomain + | ++ @email.ToLocal@@@email.ToDomain + | +@email.Subject | ++ @email.MessagePreview + | ++ @email.Attachments.Count + | +
+ Request ID: @RequestId
+
+ Swapping to Development environment will display more detailed information about the error that occurred. +
++ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +
+ +@code{ + [CascadingParameter] private HttpContext? HttpContext { get; set; } + + private string? RequestId { get; set; } + private bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + + ///Welcome to the AliasVault admin portal.
+This page gives an overview of recent system logs.
+| ID | +Time | +Application | +Level | +Message | +
|---|---|---|---|---|
| @log.Id | +@log.TimeStamp.ToString("yyyy-MM-dd HH:mm") | +@log.Application | + + @{ + string bgColor; + + switch (log.Level) + { + case "Information": + bgColor = "bg-blue-500"; + break; + case "Error": + bgColor = "bg-red-500"; + break; + case "Warning": + bgColor = "bg-yellow-500"; + break; + case "Debug": + bgColor = "bg-green-500"; + break; + default: + bgColor = "bg-gray-500"; + break; + } + } ++ + @log.Level + + | +@log.Message | +
| ');g.push(" |