mirror of
https://github.com/spacebarchat/server.git
synced 2026-06-07 02:21:45 +00:00
oapi: add missing 2fa types to login
This commit is contained in:
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",
|
||||
|
||||
@@ -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