oapi: add missing 2fa types to login

This commit is contained in:
Puyodead1
2023-03-25 20:36:54 -04:00
parent 0d666732c6
commit e68819d97a
4 changed files with 15 additions and 1 deletions
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -40,7 +40,7 @@ router.post(
requestBody: "LoginSchema",
responses: {
200: {
body: "TokenResponse",
body: "LoginResponse",
},
400: {
body: "APIErrorOrCaptchaResponse",
+14
View File
@@ -0,0 +1,14 @@
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;