Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: disable password change & account recovery

thecodrrd767da68f3a9
diff --git a/apps/web/src/index.js b/apps/web/src/index.js
index dfe0092b9..6f159c607 100644
--- a/apps/web/src/index.js
+++ b/apps/web/src/index.js
@@ -20,10 +20,10 @@ const ROUTES = {
component: () => import("./views/auth"),
props: { type: "login" },
},
- "/recover": {
- component: () => import("./views/auth"),
- props: { type: "recover" },
- },
+ // "/recover": {
+ // component: () => import("./views/auth"),
+ // props: { type: "recover" },
+ // },
default: { component: () => import("./app"), props: {} },
};
diff --git a/apps/web/src/views/auth.js b/apps/web/src/views/auth.js
index c38c7d072..95cbc1083 100644
--- a/apps/web/src/views/auth.js
+++ b/apps/web/src/views/auth.js
@@ -126,34 +126,34 @@ const authTypes = {
.catch((e) => onError(e.message));
},
},
- recover: {
- resetOnNavigate: false,
- title: "Recover your account",
- subtitle: {
- text: "Remember your password?",
- action: {
- text: "Log in",
- onClick: () => hardNavigate("/login", getQueryParams()),
- },
- },
- helpTexts: {
- email:
- "Enter your Notesnook account email so we can send you instructions on how to recover your account.",
- },
- labels: { email: "Email address" },
- primaryAction: {
- text: "Recover account",
- loadingText: "Sending recovery email...",
- },
- onSubmit: async (form, onError, onSuccess) => {
- return await db.user
- .recoverAccount(form.email.toLowerCase())
- .then(async () =>
- onSuccess("Recovery email sent. Please check your inbox (and spam).")
- )
- .catch((e) => onError(e.message));
- },
- },
+ // recover: {
+ // resetOnNavigate: false,
+ // title: "Recover your account",
+ // subtitle: {
+ // text: "Remember your password?",
+ // action: {
+ // text: "Log in",
+ // onClick: () => hardNavigate("/login", getQueryParams()),
+ // },
+ // },
+ // helpTexts: {
+ // email:
+ // "Enter your Notesnook account email so we can send you instructions on how to recover your account.",
+ // },
+ // labels: { email: "Email address" },
+ // primaryAction: {
+ // text: "Recover account",
+ // loadingText: "Sending recovery email...",
+ // },
+ // onSubmit: async (form, onError, onSuccess) => {
+ // return await db.user
+ // .recoverAccount(form.email.toLowerCase())
+ // .then(async () =>
+ // onSuccess("Recovery email sent. Please check your inbox (and spam).")
+ // )
+ // .catch((e) => onError(e.message));
+ // },
+ // },
};
function Auth(props) {
@@ -378,7 +378,7 @@ function Auth(props) {
/>
)}
- {data.supportsPasswordRecovery && (
+ {/* {data.supportsPasswordRecovery && (
<Button
type="button"
alignSelf="start"
@@ -388,7 +388,7 @@ function Auth(props) {
>
Forgot password?
</Button>
- )}
+ )} */}
<Button
data-test-id="submitButton"
display="flex"
diff --git a/apps/web/src/views/settings.js b/apps/web/src/views/settings.js
index 1d8fdfe4b..facb2ad09 100644
--- a/apps/web/src/views/settings.js
+++ b/apps/web/src/views/settings.js
@@ -223,7 +223,7 @@ function Settings(props) {
tip="In case you lose your password, you can recover your data using your recovery key."
/>
</Button>
- <Button
+ {/* <Button
variant="list"
onClick={async () => {
const result = await showPasswordDialog(
@@ -244,7 +244,7 @@ function Settings(props) {
text="Change account password"
tip="Set a new password for your account"
/>
- </Button>
+ </Button> */}
<Button variant="list" onClick={() => sync(true, true)}>
<Tip
text="Having problems with syncing?"