diff --git a/Crypter.Web/Shared/Modal/PasswordModal.razor b/Crypter.Web/Shared/Modal/PasswordChallengeModal.razor
similarity index 97%
rename from Crypter.Web/Shared/Modal/PasswordModal.razor
rename to Crypter.Web/Shared/Modal/PasswordChallengeModal.razor
index 6ffb2107c..b76717153 100644
--- a/Crypter.Web/Shared/Modal/PasswordModal.razor
+++ b/Crypter.Web/Shared/Modal/PasswordChallengeModal.razor
@@ -1,48 +1,48 @@
-@*
- * Copyright (C) 2023 Crypter File Transfer
- *
- * This file is part of the Crypter file transfer project.
- *
- * Crypter is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * The Crypter source code is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see
.
- *
- * You can be released from the requirements of the aforementioned license
- * by purchasing a commercial license. Buying such a license is mandatory
- * as soon as you develop commercial activities involving the Crypter source
- * code without disclosing the source code of your own applications.
- *
- * Contact the current copyright holder to discuss commercial license options.
- *@
-
-
-
-
-
-
+@*
+ * Copyright (C) 2023 Crypter File Transfer
+ *
+ * This file is part of the Crypter file transfer project.
+ *
+ * Crypter is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * The Crypter source code is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see
.
+ *
+ * You can be released from the requirements of the aforementioned license
+ * by purchasing a commercial license. Buying such a license is mandatory
+ * as soon as you develop commercial activities involving the Crypter source
+ * code without disclosing the source code of your own applications.
+ *
+ * Contact the current copyright holder to discuss commercial license options.
+ *@
+
+
+
+
+
+
diff --git a/Crypter.Web/Shared/Modal/PasswordModal.razor.cs b/Crypter.Web/Shared/Modal/PasswordChallengeModal.razor.cs
similarity index 95%
rename from Crypter.Web/Shared/Modal/PasswordModal.razor.cs
rename to Crypter.Web/Shared/Modal/PasswordChallengeModal.razor.cs
index 25063179f..eb1515e25 100644
--- a/Crypter.Web/Shared/Modal/PasswordModal.razor.cs
+++ b/Crypter.Web/Shared/Modal/PasswordChallengeModal.razor.cs
@@ -1,87 +1,87 @@
-/*
- * Copyright (C) 2024 Crypter File Transfer
- *
- * This file is part of the Crypter file transfer project.
- *
- * Crypter is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * The Crypter source code is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see
.
- *
- * You can be released from the requirements of the aforementioned license
- * by purchasing a commercial license. Buying such a license is mandatory
- * as soon as you develop commercial activities involving the Crypter source
- * code without disclosing the source code of your own applications.
- *
- * Contact the current copyright holder to discuss commercial license options.
- */
-
-using System;
-using System.Threading.Tasks;
-using Crypter.Common.Client.Interfaces.Services;
-using Crypter.Common.Primitives;
-using Crypter.Web.Shared.Modal.Template;
-using Microsoft.AspNetCore.Components;
-
-namespace Crypter.Web.Shared.Modal;
-
-public partial class PasswordModal
-{
- [Inject] private IUserSessionService UserSessionService { get; set; } = null!;
-
- [Parameter] public required EventCallback
ModalClosedCallback { get; set; }
-
- private ModalBehavior ModalBehaviorRef { get; set; } = null!;
-
- private string _username = string.Empty;
- private string _password = string.Empty;
- private bool _passwordTestFailed;
-
- public void Open()
- {
- _username = UserSessionService.Session.Match(
- () => string.Empty,
- x => x.Username);
-
- ModalBehaviorRef.Open();
- }
-
- private async Task CloseAsync(bool success)
- {
- await ModalClosedCallback.InvokeAsync(success);
- ModalBehaviorRef.Close();
- }
-
- private async Task TestPasswordAsync()
- {
- if (!Password.TryFrom(_password, out Password password))
- {
- return false;
- }
-
- return await UserSessionService.TestPasswordAsync(password);
- }
-
- private async Task OnSubmitClickedAsync()
- {
- if (await TestPasswordAsync())
- {
- await CloseAsync(true);
- }
-
- _passwordTestFailed = true;
- }
-
- private async Task OnCancelClickedAsync()
- {
- await CloseAsync(false);
- }
-}
+/*
+ * Copyright (C) 2024 Crypter File Transfer
+ *
+ * This file is part of the Crypter file transfer project.
+ *
+ * Crypter is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * The Crypter source code is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ *
+ * You can be released from the requirements of the aforementioned license
+ * by purchasing a commercial license. Buying such a license is mandatory
+ * as soon as you develop commercial activities involving the Crypter source
+ * code without disclosing the source code of your own applications.
+ *
+ * Contact the current copyright holder to discuss commercial license options.
+ */
+
+using System;
+using System.Threading.Tasks;
+using Crypter.Common.Client.Interfaces.Services;
+using Crypter.Common.Primitives;
+using Crypter.Web.Shared.Modal.Template;
+using Microsoft.AspNetCore.Components;
+
+namespace Crypter.Web.Shared.Modal;
+
+public partial class PasswordChallengeModal
+{
+ [Inject] private IUserSessionService UserSessionService { get; set; } = null!;
+
+ [Parameter] public required EventCallback ModalClosedCallback { get; set; }
+
+ private ModalBehavior ModalBehaviorRef { get; set; } = null!;
+
+ private string _username = string.Empty;
+ private string _password = string.Empty;
+ private bool _passwordTestFailed;
+
+ public void Open()
+ {
+ _username = UserSessionService.Session.Match(
+ () => string.Empty,
+ x => x.Username);
+
+ ModalBehaviorRef.Open();
+ }
+
+ private async Task CloseAsync(bool success)
+ {
+ await ModalClosedCallback.InvokeAsync(success);
+ ModalBehaviorRef.Close();
+ }
+
+ private async Task TestPasswordAsync()
+ {
+ if (!Password.TryFrom(_password, out Password password))
+ {
+ return false;
+ }
+
+ return await UserSessionService.TestPasswordAsync(password);
+ }
+
+ private async Task OnSubmitClickedAsync()
+ {
+ if (await TestPasswordAsync())
+ {
+ await CloseAsync(true);
+ }
+
+ _passwordTestFailed = true;
+ }
+
+ private async Task OnCancelClickedAsync()
+ {
+ await CloseAsync(false);
+ }
+}
diff --git a/Crypter.Web/Shared/UserSettings/UserSettingsAccountInfo.razor b/Crypter.Web/Shared/UserSettings/UserSettingsAccountInfo.razor
new file mode 100644
index 000000000..243ddd57a
--- /dev/null
+++ b/Crypter.Web/Shared/UserSettings/UserSettingsAccountInfo.razor
@@ -0,0 +1,108 @@
+@*
+ * Copyright (C) 2024 Crypter File Transfer
+ *
+ * This file is part of the Crypter file transfer project.
+ *
+ * Crypter is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * The Crypter source code is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ *
+ * You can be released from the requirements of the aforementioned license
+ * by purchasing a commercial license. Buying such a license is mandatory
+ * as soon as you develop commercial activities involving the Crypter source
+ * code without disclosing the source code of your own applications.
+ *
+ * Contact the current copyright holder to discuss commercial license options.
+ *@
+
+@if (_isDataReady)
+{
+ Contact Info
+
+
+ Password
+
+}
diff --git a/Crypter.Web/Shared/UserSettings/UserSettingsAccountInfo.razor.cs b/Crypter.Web/Shared/UserSettings/UserSettingsAccountInfo.razor.cs
new file mode 100644
index 000000000..e0382a7d6
--- /dev/null
+++ b/Crypter.Web/Shared/UserSettings/UserSettingsAccountInfo.razor.cs
@@ -0,0 +1,234 @@
+/*
+ * Copyright (C) 2024 Crypter File Transfer
+ *
+ * This file is part of the Crypter file transfer project.
+ *
+ * Crypter is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * The Crypter source code is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ *
+ * You can be released from the requirements of the aforementioned license
+ * by purchasing a commercial license. Buying such a license is mandatory
+ * as soon as you develop commercial activities involving the Crypter source
+ * code without disclosing the source code of your own applications.
+ *
+ * Contact the current copyright holder to discuss commercial license options.
+ */
+
+using System.Threading.Tasks;
+using Crypter.Common.Client.Interfaces.Services.UserSettings;
+using Crypter.Common.Contracts.Features.UserAuthentication.PasswordChange;
+using Crypter.Common.Contracts.Features.UserSettings.ContactInfoSettings;
+using Crypter.Common.Primitives;
+using EasyMonads;
+using Microsoft.AspNetCore.Components;
+
+namespace Crypter.Web.Shared.UserSettings;
+
+public partial class UserSettingsAccountInfo
+{
+ [Inject] private IUserContactInfoSettingsService UserContactInfoSettingsService { get; init; } = null!;
+
+ [Inject] private IUserPasswordChangeService UserPasswordChangeService { get; init; } = null!;
+
+ private string _emailAddress = string.Empty;
+ private string _emailAddressEdit = string.Empty;
+
+ private bool _emailAddressVerified = false;
+
+ private string _emailAddressPassword = string.Empty;
+ private string _passwordChangeOldPassword = string.Empty;
+ private string _passwordChangeNewPassword = string.Empty;
+ private string _passwordChangeConfirmPassword = string.Empty;
+
+ private bool _isDataReady = false;
+ private bool _isEditingEmailAddress = false;
+ private bool _isEditingPassword = false;
+
+ private string _emailAddressError = string.Empty;
+ private string _emailAddressPasswordError = string.Empty;
+ private string _genericEmailAddressError = string.Empty;
+
+ private string _oldPasswordError = string.Empty;
+ private string _newPasswordError = string.Empty;
+ private string _confirmPasswordError = string.Empty;
+ private string _passwordChangeError = string.Empty;
+
+ protected override async Task OnInitializedAsync()
+ {
+ await UserContactInfoSettingsService.GetContactInfoSettingsAsync()
+ .IfSomeAsync(x =>
+ {
+ _emailAddress = x.EmailAddress ?? string.Empty;
+ _emailAddressEdit = x.EmailAddress ?? string.Empty;
+
+ _emailAddressVerified = x.EmailAddressVerified;
+ });
+
+ _isDataReady = true;
+ }
+
+ private void OnEditContactInfoClicked()
+ {
+ _isEditingEmailAddress = true;
+ }
+
+ private void OnChangePasswordClicked()
+ {
+ _isEditingPassword = true;
+ }
+
+ private void OnCancelForEditContactInfoClicked()
+ {
+ ResetContactInfoErrors();
+ _emailAddressPassword = string.Empty;
+ _emailAddressEdit = _emailAddress;
+ _isEditingEmailAddress = false;
+ }
+
+ private void OnCancelForChangePasswordClicked()
+ {
+ ResetPasswordChangeErrors();
+ _passwordChangeOldPassword = string.Empty;
+ _passwordChangeNewPassword = string.Empty;
+ _passwordChangeConfirmPassword = string.Empty;
+ _isEditingPassword = false;
+
+ }
+
+ private void ResetContactInfoErrors()
+ {
+ _emailAddressError = string.Empty;
+ _emailAddressPasswordError = string.Empty;
+ _genericEmailAddressError = string.Empty;
+ _passwordChangeError = string.Empty;
+ }
+
+ private void ResetPasswordChangeErrors()
+ {
+ _oldPasswordError = string.Empty;
+ _newPasswordError = string.Empty;
+ _confirmPasswordError = string.Empty;
+ _passwordChangeError = string.Empty;
+ }
+
+ private async Task OnSaveContactInfoClickedAsync()
+ {
+ ResetContactInfoErrors();
+
+ if (!Password.TryFrom(_emailAddressPassword, out Password password))
+ {
+ _emailAddressPasswordError = "Enter your current password";
+ return;
+ }
+
+ bool someEmailAddress = !string.IsNullOrEmpty(_emailAddressEdit);
+ bool validEmailAddress = EmailAddress.TryFrom(_emailAddressEdit, out EmailAddress emailAddress);
+
+ if (someEmailAddress && !validEmailAddress)
+ {
+ _emailAddressError = "You must either enter a valid email address or provide a blank value";
+ return;
+ }
+
+ await UserContactInfoSettingsService.UpdateContactInfoSettingsAsync(emailAddress, password)
+ .DoRightAsync(x =>
+ {
+ _emailAddress = x.EmailAddress ?? string.Empty;
+ _emailAddressEdit = x.EmailAddress ?? string.Empty;
+
+ _emailAddressVerified = x.EmailAddressVerified;
+ })
+ .DoLeftOrNeitherAsync(
+ HandleContactInfoUpdateError,
+ () => HandleContactInfoUpdateError());
+
+ _emailAddressPassword = string.Empty;
+ _isEditingEmailAddress = false;
+ }
+
+ private async Task OnSavePasswordChangeClickAsync()
+ {
+ ResetPasswordChangeErrors();
+
+ if (!Password.TryFrom(_passwordChangeOldPassword, out Password oldPassword))
+ {
+ _oldPasswordError = "Enter your current password";
+ return;
+ }
+
+ if (!Password.TryFrom(_passwordChangeNewPassword, out Password newPassword))
+ {
+ _newPasswordError = "Enter your new password";
+ return;
+ }
+
+ if (!Password.TryFrom(_passwordChangeConfirmPassword, out Password confirmPassword) || newPassword.Value != confirmPassword.Value)
+ {
+ _confirmPasswordError = "Passwords do not match";
+ return;
+ }
+
+ await UserPasswordChangeService.ChangePasswordAsync(oldPassword, newPassword)
+ .DoRightAsync(_ => OnCancelForChangePasswordClicked())
+ .DoLeftOrNeitherAsync(
+ HandlePasswordChangeError,
+ () => HandlePasswordChangeError());
+ }
+
+ private void HandleContactInfoUpdateError(UpdateContactInfoSettingsError error = UpdateContactInfoSettingsError.UnknownError)
+ {
+ switch (error)
+ {
+ case UpdateContactInfoSettingsError.EmailAddressUnavailable:
+ _emailAddressError = "Email address unavailable";
+ break;
+ case UpdateContactInfoSettingsError.InvalidEmailAddress:
+ _emailAddressError = "Invalid email address";
+ break;
+ case UpdateContactInfoSettingsError.InvalidPassword:
+ _emailAddressPasswordError = "Incorrect password";
+ break;
+ case UpdateContactInfoSettingsError.PasswordHashFailure:
+ _emailAddressPasswordError = "A cryptographic error occured. This device or browser may not be supported.";
+ break;
+ case UpdateContactInfoSettingsError.PasswordNeedsMigration:
+ _emailAddressPasswordError = "For security purposes, you must log out then log back in to proceed with this change.";
+ break;
+ case UpdateContactInfoSettingsError.UnknownError:
+ case UpdateContactInfoSettingsError.UserNotFound:
+ case UpdateContactInfoSettingsError.InvalidUsername:
+ default:
+ _genericEmailAddressError = "An error occurred";
+ break;
+ }
+ }
+
+ private void HandlePasswordChangeError(PasswordChangeError error = PasswordChangeError.UnknownError)
+ {
+ switch (error)
+ {
+ case PasswordChangeError.InvalidPassword:
+ _oldPasswordError = "Incorrect password";
+ break;
+ case PasswordChangeError.PasswordHashFailure:
+ _passwordChangeError = "A cryptographic error occured. This device or browser may not be supported.";
+ break;
+ case PasswordChangeError.InvalidOldPasswordVersion:
+ case PasswordChangeError.InvalidNewPasswordVersion:
+ case PasswordChangeError.UnknownError:
+ default:
+ _passwordChangeError = "An error occured";
+ break;
+ }
+ }
+}
diff --git a/Crypter.Web/Shared/UserSettings/UserSettingsContactInfo.razor b/Crypter.Web/Shared/UserSettings/UserSettingsContactInfo.razor
deleted file mode 100644
index 2a79b81f4..000000000
--- a/Crypter.Web/Shared/UserSettings/UserSettingsContactInfo.razor
+++ /dev/null
@@ -1,69 +0,0 @@
-@*
- * Copyright (C) 2023 Crypter File Transfer
- *
- * This file is part of the Crypter file transfer project.
- *
- * Crypter is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * The Crypter source code is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- * You can be released from the requirements of the aforementioned license
- * by purchasing a commercial license. Buying such a license is mandatory
- * as soon as you develop commercial activities involving the Crypter source
- * code without disclosing the source code of your own applications.
- *
- * Contact the current copyright holder to discuss commercial license options.
- *@
-
-@if (_isDataReady)
-{
-
-}
diff --git a/Crypter.Web/Shared/UserSettings/UserSettingsContactInfo.razor.cs b/Crypter.Web/Shared/UserSettings/UserSettingsContactInfo.razor.cs
deleted file mode 100644
index cc40b5efa..000000000
--- a/Crypter.Web/Shared/UserSettings/UserSettingsContactInfo.razor.cs
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Copyright (C) 2024 Crypter File Transfer
- *
- * This file is part of the Crypter file transfer project.
- *
- * Crypter is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * The Crypter source code is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- *
- * You can be released from the requirements of the aforementioned license
- * by purchasing a commercial license. Buying such a license is mandatory
- * as soon as you develop commercial activities involving the Crypter source
- * code without disclosing the source code of your own applications.
- *
- * Contact the current copyright holder to discuss commercial license options.
- */
-
-using System.Threading.Tasks;
-using Crypter.Common.Client.Interfaces.Services.UserSettings;
-using Crypter.Common.Contracts.Features.UserSettings.ContactInfoSettings;
-using Crypter.Common.Primitives;
-using EasyMonads;
-using Microsoft.AspNetCore.Components;
-
-namespace Crypter.Web.Shared.UserSettings;
-
-public partial class UserSettingsContactInfo
-{
- [Inject] private IUserContactInfoSettingsService UserContactInfoSettingsService { get; init; } = null!;
-
- private string _emailAddress = string.Empty;
- private string _emailAddressEdit = string.Empty;
-
- private bool _emailAddressVerified = false;
-
- private string _password = string.Empty;
-
- private bool _isDataReady = false;
- private bool _isEditing = false;
-
- private string _emailAddressError = string.Empty;
- private string _passwordError = string.Empty;
- private string _genericError = string.Empty;
-
- protected override async Task OnInitializedAsync()
- {
- await UserContactInfoSettingsService.GetContactInfoSettingsAsync()
- .IfSomeAsync(x =>
- {
- _emailAddress = x.EmailAddress ?? string.Empty;
- _emailAddressEdit = x.EmailAddress ?? string.Empty;
-
- _emailAddressVerified = x.EmailAddressVerified;
- });
-
- _isDataReady = true;
- }
-
- private void OnEditClicked()
- {
- _isEditing = true;
- }
-
- private void OnCancelClicked()
- {
- ResetErrors();
- _password = string.Empty;
- _emailAddressEdit = _emailAddress;
- _isEditing = false;
- }
-
- private void ResetErrors()
- {
- _emailAddressError = string.Empty;
- _passwordError = string.Empty;
- _genericError = string.Empty;
- }
-
- private async Task OnSaveClickedAsync()
- {
- ResetErrors();
-
- if (!Password.TryFrom(_password, out var password))
- {
- _passwordError = "Enter your current password";
- return;
- }
-
- bool someEmailAddress = !string.IsNullOrEmpty(_emailAddressEdit);
- bool validEmailAddress = EmailAddress.TryFrom(_emailAddressEdit, out EmailAddress emailAddress);
-
- if (someEmailAddress && !validEmailAddress)
- {
- _emailAddressError = "You must either enter a valid email address or provide a blank value";
- return;
- }
-
- await UserContactInfoSettingsService.UpdateContactInfoSettingsAsync(emailAddress, password)
- .DoRightAsync(x =>
- {
- _emailAddress = x.EmailAddress ?? string.Empty;
- _emailAddressEdit = x.EmailAddress ?? string.Empty;
-
- _emailAddressVerified = x.EmailAddressVerified;
- })
- .DoLeftOrNeitherAsync(
- HandleContactInfoUpdateError,
- () => HandleContactInfoUpdateError());
-
- _password = string.Empty;
- _isEditing = false;
- }
-
- private void HandleContactInfoUpdateError(
- UpdateContactInfoSettingsError error = UpdateContactInfoSettingsError.UnknownError)
- {
- switch (error)
- {
- case UpdateContactInfoSettingsError.EmailAddressUnavailable:
- _emailAddressError = "Email address unavailable";
- break;
- case UpdateContactInfoSettingsError.InvalidEmailAddress:
- _emailAddressError = "Invalid email address";
- break;
- case UpdateContactInfoSettingsError.InvalidPassword:
- _passwordError = "Incorrect password";
- break;
- case UpdateContactInfoSettingsError.PasswordHashFailure:
- _passwordError = "A cryptographic error occured. This device or browser may not be supported.";
- break;
- case UpdateContactInfoSettingsError.PasswordNeedsMigration:
- _passwordError =
- "For security purposes, you must log out then log back in to proceed with this change.";
- break;
- case UpdateContactInfoSettingsError.UnknownError:
- case UpdateContactInfoSettingsError.UserNotFound:
- case UpdateContactInfoSettingsError.InvalidUsername:
- default:
- _genericError = "An error occurred";
- break;
- }
- }
-}
diff --git a/Crypter.Web/Shared/UserSettings/UserSettingsKeys.razor b/Crypter.Web/Shared/UserSettings/UserSettingsKeys.razor
index e7d1e72e4..8bfb45ec0 100644
--- a/Crypter.Web/Shared/UserSettings/UserSettingsKeys.razor
+++ b/Crypter.Web/Shared/UserSettings/UserSettingsKeys.razor
@@ -24,7 +24,7 @@
* Contact the current copyright holder to discuss commercial license options.
*@
-
+
Recovery
diff --git a/Crypter.Web/Shared/UserSettings/UserSettingsKeys.razor.cs b/Crypter.Web/Shared/UserSettings/UserSettingsKeys.razor.cs
index bbfe61ef8..6046194c5 100644
--- a/Crypter.Web/Shared/UserSettings/UserSettingsKeys.razor.cs
+++ b/Crypter.Web/Shared/UserSettings/UserSettingsKeys.razor.cs
@@ -45,7 +45,7 @@ public partial class UserSettingsKeys : IDisposable
[Inject] private IJSRuntime JsRuntime { get; init; } = null!;
- private PasswordModal _passwordModal = null!;
+ private PasswordChallengeModal _passwordModal = null!;
private string _privateKey = string.Empty;
private string _recoveryKey = string.Empty;