Newer
Older
percord / src / util / schemas / LoginResponse.ts
@Puyodead1 Puyodead1 on 13 Apr 2023 298 bytes oapi: add missing 2fa types to login
import { TokenResponse } from "./responses";

export interface MFAResponse {
	ticket: string;
	mfa: true;
	sms: false; // TODO
	token: null;
}

export interface WebAuthnResponse extends MFAResponse {
	webauthn: string;
}

export type LoginResponse = TokenResponse | MFAResponse | WebAuthnResponse;