summary refs log tree commit diff
path: root/src/util/schemas/LoginResponse.ts
diff options
context:
space:
mode:
authorPuyodead1 <puyodead@proton.me>2023-03-25 20:36:54 -0400
committerPuyodead1 <puyodead@proton.me>2023-04-13 15:41:49 -0400
commite68819d97ada081a21f054cb4d615283518d98e3 (patch)
tree49a0a647bceea3bebd9a3e43ea40ede6eb1d0d39 /src/util/schemas/LoginResponse.ts
parentoapi: bug fixes (diff)
downloadserver-e68819d97ada081a21f054cb4d615283518d98e3.tar.xz
oapi: add missing 2fa types to login
Diffstat (limited to 'src/util/schemas/LoginResponse.ts')
-rw-r--r--src/util/schemas/LoginResponse.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/util/schemas/LoginResponse.ts b/src/util/schemas/LoginResponse.ts
new file mode 100644
index 00000000..faf3f769
--- /dev/null
+++ b/src/util/schemas/LoginResponse.ts
@@ -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;