Skip to content

armgit / ente

Public Imported from GitHub
0

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

id is always sent be server

Manav Rathi650163c34198
diff --git a/web/apps/auth/src/pages/auth.tsx b/web/apps/auth/src/pages/auth.tsx
index b47a17a4b9..7be7835a85 100644
--- a/web/apps/auth/src/pages/auth.tsx
+++ b/web/apps/auth/src/pages/auth.tsx
@@ -161,11 +161,11 @@ const AuthNavbar: React.FC = () => {
);
};
-interface CodeDisplay {
+interface CodeDisplayProps {
code: Code;
}
-const CodeDisplay: React.FC<CodeDisplay> = ({ code }) => {
+const CodeDisplay: React.FC<CodeDisplayProps> = ({ code }) => {
const [otp, setOTP] = useState("");
const [nextOTP, setNextOTP] = useState("");
const [errorMessage, setErrorMessage] = useState("");
diff --git a/web/apps/auth/src/services/code.ts b/web/apps/auth/src/services/code.ts
index dc1a6db242..82e369a8e3 100644
--- a/web/apps/auth/src/services/code.ts
+++ b/web/apps/auth/src/services/code.ts
@@ -9,7 +9,7 @@ import { Steam } from "./steam";
*/
export interface Code {
/** A unique id for the corresponding "auth entity" in our system. */
- id?: String;
+ id: string;
/** The type of the code. */
type: "totp" | "hotp" | "steam";
/** The user's account or email for which this code is used. */
diff --git a/web/apps/auth/src/services/remote.ts b/web/apps/auth/src/services/remote.ts
index b47f1d4822..28d9e59a6b 100644
--- a/web/apps/auth/src/services/remote.ts
+++ b/web/apps/auth/src/services/remote.ts
@@ -26,6 +26,7 @@ export const getAuthCodes = async (): Promise<Code[]> => {
authEntity
.filter((f) => !f.isDeleted)
.map(async (entity) => {
+ if (!entity.id) return undefined;
if (!entity.encryptedData) return undefined;
if (!entity.header) return undefined;
try {