id is always sent be server

This commit is contained in:
Manav Rathi 2024-05-25 16:37:49 +05:30
parent d101208baa
commit 650163c341
No known key found for this signature in database
3 changed files with 4 additions and 3 deletions

View file

@ -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("");

View file

@ -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. */

View file

@ -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 {