oapi: add missing 2fa types to login
This commit is contained in:
parent
0d666732c6
commit
e68819d97a
Binary file not shown.
Binary file not shown.
@ -40,7 +40,7 @@ router.post(
|
||||
requestBody: "LoginSchema",
|
||||
responses: {
|
||||
200: {
|
||||
body: "TokenResponse",
|
||||
body: "LoginResponse",
|
||||
},
|
||||
400: {
|
||||
body: "APIErrorOrCaptchaResponse",
|
||||
|
||||
14
src/util/schemas/LoginResponse.ts
Normal file
14
src/util/schemas/LoginResponse.ts
Normal 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;
|
||||
Reference in New Issue
Block a user