π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Use
Manav Rathi0fe5b45f8b74
diff --git a/web/packages/accounts/pages/verify.tsx b/web/packages/accounts/pages/verify.tsxindex db5c40c811..72dc9eb325 100644--- a/web/packages/accounts/pages/verify.tsx+++ b/web/packages/accounts/pages/verify.tsx@@ -19,8 +19,8 @@ import {import {configureSRP,getSRPAttributes,+ unstashAndUseSRPSetupAttributes,type SRPAttributes,- type SRPSetupAttributes,} from "ente-accounts/services/srp";import type { KeyAttributes, User } from "ente-accounts/services/user";import {@@ -146,11 +146,7 @@ const Page: React.FC = () => {if (originalKeyAttributes) {await putUserKeyAttributes(originalKeyAttributes);}- if (getData("srpSetupAttributes")) {- const srpSetupAttributes: SRPSetupAttributes =- getData("srpSetupAttributes");- await configureSRP(srpSetupAttributes);- }+ await unstashAndUseSRPSetupAttributes(configureSRP);}// TODO(RE): Temporary safety valve before removing the// unnecessary clear (tag: Migration)diff --git a/web/packages/accounts/services/srp.ts b/web/packages/accounts/services/srp.tsindex 3e143619e4..618665d6f9 100644--- a/web/packages/accounts/services/srp.ts+++ b/web/packages/accounts/services/srp.ts@@ -461,8 +461,15 @@ export const updateSRPAndKeys = async (}};-export const configureSRP = async (attr: SRPSetupAttributes) =>- srpSetupOrReconfigure(attr, (cbAttr) =>+/**+ * Use the provided {@link SRPSetupAttributes} to, well, setup SRP.+ *+ * See: [Note: SRP setup]+ *+ * @param srpSetupAttributes SRP setup attributes.+ */+export const configureSRP = async (srpSetupAttributes: SRPSetupAttributes) =>+ srpSetupOrReconfigure(srpSetupAttributes, (cbAttr) =>completeSRPSetup(getToken(), cbAttr),);diff --git a/web/packages/shared/storage/localStorage/index.ts b/web/packages/shared/storage/localStorage/index.tsindex e952abbb6b..0b6dd7a58f 100644--- a/web/packages/shared/storage/localStorage/index.ts+++ b/web/packages/shared/storage/localStorage/index.ts@@ -16,7 +16,7 @@ export type LocalStorageKey =// Moved to the new wrapper ente-base/local-storage// LOCALE = 'locale',// Moved to ente-accounts- | "srpSetupAttributes"+ // "srpSetupAttributes"| "srpAttributes"| "referralSource";