A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: fix session expiry login flow
Abdullah Atta6718be881b87
diff --git a/apps/web/src/views/auth.tsx b/apps/web/src/views/auth.tsxindex 08ec7d60e..8d8417cca 100644--- a/apps/web/src/views/auth.tsx+++ b/apps/web/src/views/auth.tsx@@ -27,7 +27,6 @@ import {MfaSms,MfaEmail,MfaRecoveryCode,- ArrowRight,Logout,Icon} from "../components/icons";@@ -89,7 +88,7 @@ type AuthFormData = {"login:email": EmailFormData;"login:password": PasswordFormData;signup: SignupFormData;- sessionExpiry: EmailFormData & PasswordFormData;+ sessionExpiry: EmailFormData;recover: AccountRecoveryFormData;"mfa:code": MFAFormData;"mfa:select": MFAFormData;@@ -460,9 +459,19 @@ function SessionExpiry(props: BaseAuthComponentProps<"sessionExpiry">) {title: "Logging you in",subtitle: "Please wait while you are authenticated."}}- onSubmit={async (form) => {+ onSubmit={async () => {if (!user) return;- // await login({ email: user.email, password: form.password }, navigate);++ const { primaryMethod, phoneNumber, secondaryMethod } =+ (await userstore.login(user)) as MFAErrorData;++ navigate("mfa:code", {+ email: user.email,+ selectedMethod: primaryMethod,+ primaryMethod,+ phoneNumber,+ secondaryMethod+ });}}><AuthField@@ -474,12 +483,6 @@ function SessionExpiry(props: BaseAuthComponentProps<"sessionExpiry">) {autoFocusdisabled/>- <AuthField- id="password"- type="password"- autoComplete="current-password"- label="Enter password"- /><Buttondata-test-id="auth-forgot-password"type="button"