From 56f47830758ff8e92abcfcc5f35d474ab12fe215 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 5 Oct 2022 15:37:15 +0200 Subject: Support two factor authentication in backend --- shared/models/users/index.ts | 1 + shared/models/users/two-factor-enable-result.model.ts | 7 +++++++ shared/models/users/user.model.ts | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 shared/models/users/two-factor-enable-result.model.ts (limited to 'shared/models') diff --git a/shared/models/users/index.ts b/shared/models/users/index.ts index b25978587..32f7a441c 100644 --- a/shared/models/users/index.ts +++ b/shared/models/users/index.ts @@ -1,3 +1,4 @@ +export * from './two-factor-enable-result.model' export * from './user-create-result.model' export * from './user-create.model' export * from './user-flag.model' diff --git a/shared/models/users/two-factor-enable-result.model.ts b/shared/models/users/two-factor-enable-result.model.ts new file mode 100644 index 000000000..1fc801f0a --- /dev/null +++ b/shared/models/users/two-factor-enable-result.model.ts @@ -0,0 +1,7 @@ +export interface TwoFactorEnableResult { + otpRequest: { + requestToken: string + secret: string + uri: string + } +} diff --git a/shared/models/users/user.model.ts b/shared/models/users/user.model.ts index 63c5c8a92..7b6494ff8 100644 --- a/shared/models/users/user.model.ts +++ b/shared/models/users/user.model.ts @@ -62,6 +62,8 @@ export interface User { pluginAuth: string | null lastLoginDate: Date | null + + twoFactorEnabled: boolean } export interface MyUserSpecialPlaylist { -- cgit v1.2.3