π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[web][photos] Fix infinite loop on half-logins
Manav Rathieecb8b70f41d
diff --git a/web/apps/photos/src/pages/index.tsx b/web/apps/photos/src/pages/index.tsxindex 9aa3500ecf..fc888af83e 100644--- a/web/apps/photos/src/pages/index.tsx+++ b/web/apps/photos/src/pages/index.tsx@@ -17,6 +17,7 @@ import ElectronAPIs from "@ente/shared/electron";import { getAlbumsURL } from "@ente/shared/network/api";import { logError } from "@ente/shared/sentry";import localForage from "@ente/shared/storage/localForage";+import { getToken } from "@ente/shared/storage/localStorage/helpers";import { getKey, SESSION_KEYS } from "@ente/shared/storage/sessionStorage";import isElectron from "is-electron";import { Trans } from "react-i18next";@@ -145,18 +146,11 @@ export default function LandingPage() {);}}- if (key) {- // if (appName === APPS.AUTH) {- // await router.push(PAGES.AUTH);- // } else {+ const token = getToken();+ if (key && token) {await router.push(PAGES.GALLERY);- // }} else if (user?.email) {await router.push(PAGES.VERIFY);- } else {- // if (appName === APPS.AUTH) {- // await router.push(PAGES.LOGIN);- // }}await initLocalForage();setLoading(false);