1
0
mirror of https://github.com/bitwarden/web synced 2025-12-19 09:43:33 +00:00

[KeyConnector] Add support for key connector OTP (#1256)

Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
This commit is contained in:
Oscar Hinton
2021-11-09 19:24:26 +01:00
committed by GitHub
parent e5eb5d61fe
commit db5a8df64e
46 changed files with 473 additions and 250 deletions

View File

@@ -10,6 +10,7 @@ import { DeleteAccountComponent } from './delete-account.component';
import { PurgeVaultComponent } from './purge-vault.component';
import { ApiService } from 'jslib-common/abstractions/api.service';
import { KeyConnectorService } from 'jslib-common/abstractions/keyConnector.service';
import { UserService } from 'jslib-common/abstractions/user.service';
import { ModalService } from 'jslib-angular/services/modal.service';
@@ -25,8 +26,17 @@ export class AccountComponent {
@ViewChild('viewUserApiKeyTemplate', { read: ViewContainerRef, static: true }) viewUserApiKeyModalRef: ViewContainerRef;
@ViewChild('rotateUserApiKeyTemplate', { read: ViewContainerRef, static: true }) rotateUserApiKeyModalRef: ViewContainerRef;
showChangePassword = true;
showChangeKdf = true;
showChangeEmail = true;
constructor(private modalService: ModalService, private apiService: ApiService,
private userService: UserService) { }
private userService: UserService, private keyConnectorService: KeyConnectorService) { }
async ngOnInit() {
this.showChangeEmail = this.showChangeKdf = this.showChangePassword =
!await this.keyConnectorService.getUsesKeyConnector();
}
async deauthorizeSessions() {
await this.modalService.openViewRef(DeauthorizeSessionsComponent, this.deauthModalRef);