diff --git a/web/apps/auth/package.json b/web/apps/auth/package.json index d21e1dc055..463ff06e8d 100644 --- a/web/apps/auth/package.json +++ b/web/apps/auth/package.json @@ -6,6 +6,7 @@ "@/next": "*", "@ente/accounts": "*", "@ente/eslint-config": "*", - "@ente/shared": "*" + "@ente/shared": "*", + "otpauth": "^9" } } diff --git a/web/apps/auth/src/pages/auth.tsx b/web/apps/auth/src/pages/auth.tsx index e628050ea2..4006cc9e19 100644 --- a/web/apps/auth/src/pages/auth.tsx +++ b/web/apps/auth/src/pages/auth.tsx @@ -15,10 +15,9 @@ import MoreHoriz from "@mui/icons-material/MoreHoriz"; import { Button, ButtonBase, Snackbar, TextField } from "@mui/material"; import { t } from "i18next"; import { useRouter } from "next/router"; -import { HOTP, TOTP } from "otpauth"; import { AppContext } from "pages/_app"; import React, { useContext, useEffect, useState } from "react"; -import { Code } from "services/code"; +import { generateOTPs, type Code } from "services/code"; import { getAuthCodes } from "services/remote"; const AuthenticatorCodesPage = () => { @@ -43,7 +42,7 @@ const AuthenticatorCodesPage = () => { } setHasFetched(true); }; - fetchCodes(); + void fetchCodes(); appContext.showNavBar(false); }, []); @@ -122,12 +121,12 @@ const AuthenticatorCodesPage = () => { ) : ( filteredCodes.map((code) => ( - + )) )}
- +