+ Forgot Password
+
+
+ @if (isReset)
+ {
+ Your password has been reset. Log in with your new password any time.
+ } else if (isCodeSent)
+ {
+ Look for an email from shogi@lucaserver.space with a reset code and fill out the form.
+ }
+
+
+
+
+@code {
+
+ private bool isCodeSent = false;
+ private bool isReset = false;
+ private string email = string.Empty;
+ private string code = string.Empty;
+ private string newPassword = string.Empty;
+ private string confirmPassword = string.Empty;
+ private string[] errorList = [];
+
+ async Task SendResetCode()
+ {
+ if (string.IsNullOrWhiteSpace(email))
+ {
+ errorList = ["Email is required"];
+ return;
+ }
+
+ var response = await Acct.RequestPasswordReset(email);
+ isCodeSent = response.IsSuccessStatusCode;
+ if (!response.IsSuccessStatusCode)
+ {
+ errorList = [await response.Content.ReadAsStringAsync()];
+ }
+ }
+
+ async Task ChangePassword()
+ {
+ var errors = new List