diff options
Diffstat (limited to 'src/util/entities')
-rw-r--r-- | src/util/entities/User.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/entities/User.ts b/src/util/entities/User.ts index c6582b00..25586793 100644 --- a/src/util/entities/User.ts +++ b/src/util/entities/User.ts @@ -85,6 +85,12 @@ export interface UserPrivate extends Pick<User, PrivateUserKeys> { locale: string; } +export enum AuthenticatorType { + WEBAUTHN = 1, + TOTP = 2, + SMS = 3, +} + @Entity("users") export class User extends BaseClass { @Column() @@ -231,6 +237,9 @@ export class User extends BaseClass { @OneToMany(() => SecurityKey, (key: SecurityKey) => key.user) security_keys: SecurityKey[]; + @Column({ type: "simple-array", select: false }) + authenticator_types: AuthenticatorType[] = []; + // TODO: I don't like this method? validate() { if (this.discriminator) { |