mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-07 09:31:31 +01:00
init u2f param
This commit is contained in:
parent
cfec7c4815
commit
05859a1df3
@ -27,6 +27,7 @@ export class TwoFactorComponent implements OnInit, OnDestroy {
|
||||
token: string = '';
|
||||
remember: boolean = false;
|
||||
u2fReady: boolean = false;
|
||||
initU2f: boolean = true;
|
||||
providers = TwoFactorProviders;
|
||||
providerType = TwoFactorProviderType;
|
||||
selectedProviderType: TwoFactorProviderType = TwoFactorProviderType.Authenticator;
|
||||
@ -57,7 +58,7 @@ export class TwoFactorComponent implements OnInit, OnDestroy {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.win != null && this.u2fSupported) {
|
||||
if (this.initU2f && this.win != null && this.u2fSupported) {
|
||||
let customWebVaultUrl: string = null;
|
||||
if (this.environmentService.baseUrl != null) {
|
||||
customWebVaultUrl = this.environmentService.baseUrl;
|
||||
@ -102,7 +103,9 @@ export class TwoFactorComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
if (providerData.Challenge != null) {
|
||||
setTimeout(() => {
|
||||
this.u2f.init(JSON.parse(providerData.Challenge));
|
||||
}, 500);
|
||||
} else {
|
||||
// TODO: Deprecated. Remove in future version.
|
||||
const challenges = JSON.parse(providerData.Challenges);
|
||||
|
Loading…
Reference in New Issue
Block a user