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: specify if session has expired during login
Abdullah Atta3d11fb5e3fbe
diff --git a/apps/web/src/stores/user-store.js b/apps/web/src/stores/user-store.jsindex fd2112ca0..68b3682ae 100644--- a/apps/web/src/stores/user-store.js+++ b/apps/web/src/stores/user-store.js@@ -112,7 +112,7 @@ class UserStore extends BaseStore {});};- login = async (form, skipInit = false) => {+ login = async (form, skipInit = false, sessionExpired = false) => {this.set((state) => (state.isLoggingIn = true));const { email, password, code, method } = form;@@ -120,7 +120,12 @@ class UserStore extends BaseStore {if (code) {return await db.user.authenticateMultiFactorCode(code, method);} else if (password) {- await db.user.authenticatePassword(email, password, null);+ await db.user.authenticatePassword(+ email,+ password,+ null,+ sessionExpired+ );Config.set("encryptBackups", true);if (skipInit) return true;diff --git a/apps/web/src/views/auth.tsx b/apps/web/src/views/auth.tsxindex e737617ac..115b89a66 100644--- a/apps/web/src/views/auth.tsx+++ b/apps/web/src/views/auth.tsx@@ -278,10 +278,14 @@ function LoginPassword(props: BaseAuthComponentProps<"login:password">) {subtitle: "Please wait while you are authenticated."}}onSubmit={async (form) => {- await userstore.login({- password: form.password,- email: formData.email- });+ await userstore.login(+ {+ password: form.password,+ email: formData.email+ },+ false,+ Config.get("sessionExpired", false)+ );Config.set("sessionExpired", false);openURL("/");}}