Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Rearrange

Manav Rathi91891fc5b5c7
diff --git a/web/packages/accounts/services/srp.ts b/web/packages/accounts/services/srp.ts
index ebdf3331a1..80d734f42a 100644
--- a/web/packages/accounts/services/srp.ts
+++ b/web/packages/accounts/services/srp.ts
@@ -495,15 +495,6 @@ const completeSRPSetup = async (
return CompleteSRPSetupResponse.parse(await res.json());
};
-interface CreateSRPSessionResponse {
- sessionID: string;
- srpB: string;
-}
-
-export interface SRPVerificationResponse extends UserVerificationResponse {
- srpM2: string;
-}
-
export interface UpdatedKeyAttr {
kekSalt: string;
encryptedKey: string;
@@ -583,6 +574,11 @@ export const loginViaSRP = async (
}
};
+interface CreateSRPSessionResponse {
+ sessionID: string;
+ srpB: string;
+}
+
const createSRPSession = async (srpUserID: string, srpA: string) => {
const res = await fetch(await apiURL("/users/srp/create-session"), {
method: "POST",
@@ -595,6 +591,10 @@ const createSRPSession = async (srpUserID: string, srpA: string) => {
return data as CreateSRPSessionResponse;
};
+export interface SRPVerificationResponse extends UserVerificationResponse {
+ srpM2: string;
+}
+
const verifySRPSession = async (
sessionID: string,
srpUserID: string,