1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-18 02:41:15 +02:00

support for new Challenge token for U2F

This commit is contained in:
Kyle Spearrin 2018-10-10 17:52:08 -04:00
parent 9cd0bd5f7c
commit 90f723316a

View File

@ -97,6 +97,10 @@ export class TwoFactorComponent implements OnInit, OnDestroy {
break;
}
if (params.Challenge != null) {
this.u2f.init(JSON.parse(params.Challenge));
} else {
// TODO: Deprecated. Remove in future version.
const challenges = JSON.parse(params.Challenges);
if (challenges != null && challenges.length > 0) {
this.u2f.init({
@ -110,6 +114,7 @@ export class TwoFactorComponent implements OnInit, OnDestroy {
}),
});
}
}
break;
case TwoFactorProviderType.Duo:
case TwoFactorProviderType.OrganizationDuo: