diff --git a/Marechai/Pages/Account/Login.razor b/Marechai/Pages/Account/Login.razor
index 78a93bda..9324d953 100644
--- a/Marechai/Pages/Account/Login.razor
+++ b/Marechai/Pages/Account/Login.razor
@@ -101,7 +101,7 @@
@L["Don't have an account?"]
@L["Sign up"]
- @if(_emailNotConfirmed)
+ @if(!string.IsNullOrWhiteSpace(_errorMessage))
{
@L["Resend confirmation email"]
diff --git a/Marechai/Pages/Account/Login.razor.cs b/Marechai/Pages/Account/Login.razor.cs
index b6872c4d..c104b3e7 100644
--- a/Marechai/Pages/Account/Login.razor.cs
+++ b/Marechai/Pages/Account/Login.razor.cs
@@ -37,7 +37,6 @@ public partial class Login
string _infoMessage;
bool _isLoading;
string _password;
- bool _emailNotConfirmed;
// Two-factor state
bool _requiresTwoFactor;
@@ -67,7 +66,6 @@ public partial class Login
_isLoading = true;
_errorMessage = null;
_infoMessage = null;
- _emailNotConfirmed = false;
LoginResult result = await AuthService.LoginAsync(_email, _password);
@@ -90,14 +88,6 @@ public partial class Login
return;
}
- if(result.EmailNotConfirmed)
- {
- _emailNotConfirmed = true;
- _errorMessage = result.ErrorMessage ?? L["Please confirm your email address before signing in."];
-
- return;
- }
-
_errorMessage = result.ErrorMessage ?? L["Login failed."];
}
diff --git a/Marechai/Services/AuthService.cs b/Marechai/Services/AuthService.cs
index 85d4655b..1381a485 100644
--- a/Marechai/Services/AuthService.cs
+++ b/Marechai/Services/AuthService.cs
@@ -36,13 +36,11 @@ namespace Marechai.Services;
///
/// Outcome of . Either the JWT was issued and the user is fully signed
/// in ( + JWT applied), or the server requires a second factor and the caller must
-/// prompt for a code using + , or the email
-/// hasn't been confirmed yet () and the UI should offer a "resend" link.
+/// prompt for a code using + .
///
public sealed record LoginResult(bool Succeeded, string ErrorMessage,
bool RequiresTwoFactor, string TwoFactorToken,
- IList AvailableMethods,
- bool EmailNotConfirmed = false);
+ IList AvailableMethods);
public sealed class AuthService(Marechai.ApiClient.Client client,
TokenProvider tokenProvider,
@@ -64,14 +62,6 @@ public sealed class AuthService(Marechai.ApiClient.Client client,
if(response is null)
return new LoginResult(false, "No response from server.", false, null, []);
- if(response.EmailNotConfirmed == true)
- return new LoginResult(false,
- "Please confirm your email address before signing in.",
- false,
- null,
- [],
- EmailNotConfirmed: true);
-
if(response.Succeeded != true)
return new LoginResult(false, response.Message ?? "Login failed.", false, null, []);