diff options
| author | Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com> | 2019-07-07 01:38:36 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-07-07 01:38:36 +0900 |
| commit | 047a46d96689a97bee4c843fcd86e63b816846f1 (patch) | |
| tree | 6c5c2f8c06941c36207986c5adc0e1c7a23647b4 /src/models | |
| parent | Pages: ボタンを色付き表示できるように (diff) | |
| download | sharkey-047a46d96689a97bee4c843fcd86e63b816846f1.tar.gz sharkey-047a46d96689a97bee4c843fcd86e63b816846f1.tar.bz2 sharkey-047a46d96689a97bee4c843fcd86e63b816846f1.zip | |
Support password-less login with WebAuthn (#5112)
* Support password-less login with WebAuthn
* Fix initial value of usePasswordLessLogin
Diffstat (limited to 'src/models')
| -rw-r--r-- | src/models/entities/user-profile.ts | 5 | ||||
| -rw-r--r-- | src/models/repositories/user.ts | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/models/entities/user-profile.ts b/src/models/entities/user-profile.ts index 6f960f1b7b..4a588ebfbf 100644 --- a/src/models/entities/user-profile.ts +++ b/src/models/entities/user-profile.ts @@ -81,6 +81,11 @@ export class UserProfile { }) public securityKeysAvailable: boolean; + @Column('boolean', { + default: false, + }) + public usePasswordLessLogin: boolean; + @Column('varchar', { length: 128, nullable: true, comment: 'The password hash of the User. It will be null if the origin of the user is local.' diff --git a/src/models/repositories/user.ts b/src/models/repositories/user.ts index cc89b674c5..06da74197f 100644 --- a/src/models/repositories/user.ts +++ b/src/models/repositories/user.ts @@ -156,6 +156,7 @@ export class UserRepository extends Repository<User> { detail: true }), twoFactorEnabled: profile!.twoFactorEnabled, + usePasswordLessLogin: profile!.usePasswordLessLogin, securityKeys: profile!.twoFactorEnabled ? UserSecurityKeys.count({ userId: user.id @@ -208,7 +209,6 @@ export class UserRepository extends Repository<User> { select: ['id', 'name', 'lastUsed'] }) : [] - } : {}), ...(relation ? { |