Move
This commit is contained in:
@@ -8,8 +8,8 @@ import { LS_KEYS, setData, setLSUser } from "@ente/shared/storage/localStorage";
|
||||
import { Input, Stack, Typography } from "@mui/material";
|
||||
import { t } from "i18next";
|
||||
import { useRouter } from "next/router";
|
||||
import { getSRPAttributes } from "../api/srp";
|
||||
import { PAGES } from "../constants/pages";
|
||||
import { getSRPAttributes } from "../services/srp-remote";
|
||||
import { sendOtt } from "../services/user";
|
||||
|
||||
interface LoginProps {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import {
|
||||
getSRPAttributes,
|
||||
startSRPSetup,
|
||||
updateSRPAndKeys,
|
||||
} from "@/accounts/api/srp";
|
||||
import {
|
||||
convertBase64ToBuffer,
|
||||
convertBufferToBase64,
|
||||
generateSRPClient,
|
||||
generateSRPSetupAttributes,
|
||||
} from "@/accounts/services/srp";
|
||||
import {
|
||||
getSRPAttributes,
|
||||
startSRPSetup,
|
||||
updateSRPAndKeys,
|
||||
} from "@/accounts/services/srp-remote";
|
||||
import {
|
||||
FormPaper,
|
||||
FormPaperFooter,
|
||||
|
||||
@@ -39,8 +39,6 @@ import { Stack } from "@mui/material";
|
||||
import { t } from "i18next";
|
||||
import { useRouter } from "next/router";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import type { SRPAttributes } from "../api/srp";
|
||||
import { getSRPAttributes } from "../api/srp";
|
||||
import {
|
||||
LoginFlowFormFooter,
|
||||
PasswordHeader,
|
||||
@@ -62,6 +60,8 @@ import {
|
||||
generateSRPSetupAttributes,
|
||||
loginViaSRP,
|
||||
} from "../services/srp";
|
||||
import type { SRPAttributes } from "../services/srp-remote";
|
||||
import { getSRPAttributes } from "../services/srp-remote";
|
||||
import type { PageProps } from "../types/page";
|
||||
|
||||
const Page: React.FC<PageProps> = ({ appContext }) => {
|
||||
|
||||
@@ -27,8 +27,6 @@ import { t } from "i18next";
|
||||
import { useRouter } from "next/router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Trans } from "react-i18next";
|
||||
import type { SRPAttributes, SRPSetupAttributes } from "../api/srp";
|
||||
import { getSRPAttributes } from "../api/srp";
|
||||
import {
|
||||
LoginFlowFormFooter,
|
||||
VerifyingPasskey,
|
||||
@@ -40,6 +38,8 @@ import {
|
||||
} from "../services/passkey";
|
||||
import { stashedRedirect, unstashRedirect } from "../services/redirect";
|
||||
import { configureSRP } from "../services/srp";
|
||||
import type { SRPAttributes, SRPSetupAttributes } from "../services/srp-remote";
|
||||
import { getSRPAttributes } from "../services/srp-remote";
|
||||
import { putAttributes, sendOtt, verifyOtt } from "../services/user";
|
||||
import type { PageProps } from "../types/page";
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import { ensureLocalUser } from "@/base/local-user";
|
||||
import { apiURL } from "@/base/origins";
|
||||
import { getData, LS_KEYS } from "@ente/shared/storage/localStorage";
|
||||
import type { KeyAttributes } from "@ente/shared/user/types";
|
||||
import type { SRPAttributes } from "../api/srp";
|
||||
import { getSRPAttributes } from "../api/srp";
|
||||
import type { SRPAttributes } from "./srp-remote";
|
||||
import { getSRPAttributes } from "./srp-remote";
|
||||
|
||||
type SessionValidity =
|
||||
| { status: "invalid" }
|
||||
|
||||
@@ -6,13 +6,13 @@ import { getToken } from "@ente/shared/storage/localStorage/helpers";
|
||||
import type { KeyAttributes } from "@ente/shared/user/types";
|
||||
import { SRP, SrpClient } from "fast-srp-hap";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import type { SRPAttributes, SRPSetupAttributes } from "../api/srp";
|
||||
import type { SRPAttributes, SRPSetupAttributes } from "./srp-remote";
|
||||
import {
|
||||
completeSRPSetup,
|
||||
createSRPSession,
|
||||
startSRPSetup,
|
||||
verifySRPSession,
|
||||
} from "../api/srp";
|
||||
} from "./srp-remote";
|
||||
|
||||
const SRP_PARAMS = SRP.params["4096"];
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { SRPAttributes } from "@/accounts/api/srp";
|
||||
import type { SRPAttributes } from "@/accounts/services/srp-remote";
|
||||
import { sharedCryptoWorker } from "@/base/crypto";
|
||||
import log from "@/base/log";
|
||||
import { Input, type ButtonProps } from "@mui/material";
|
||||
|
||||
Reference in New Issue
Block a user