id is always sent be server
This commit is contained in:
parent
d101208baa
commit
650163c341
|
@ -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("");
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue