mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-06 18:57:56 +01:00
support for new Challenge token for U2F
This commit is contained in:
parent
9cd0bd5f7c
commit
90f723316a
@ -97,18 +97,23 @@ export class TwoFactorComponent implements OnInit, OnDestroy {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
const challenges = JSON.parse(params.Challenges);
|
if (params.Challenge != null) {
|
||||||
if (challenges != null && challenges.length > 0) {
|
this.u2f.init(JSON.parse(params.Challenge));
|
||||||
this.u2f.init({
|
} else {
|
||||||
appId: challenges[0].appId,
|
// TODO: Deprecated. Remove in future version.
|
||||||
challenge: challenges[0].challenge,
|
const challenges = JSON.parse(params.Challenges);
|
||||||
keys: challenges.map((c: any) => {
|
if (challenges != null && challenges.length > 0) {
|
||||||
return {
|
this.u2f.init({
|
||||||
version: c.version,
|
appId: challenges[0].appId,
|
||||||
keyHandle: c.keyHandle,
|
challenge: challenges[0].challenge,
|
||||||
};
|
keys: challenges.map((c: any) => {
|
||||||
}),
|
return {
|
||||||
});
|
version: c.version,
|
||||||
|
keyHandle: c.keyHandle,
|
||||||
|
};
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TwoFactorProviderType.Duo:
|
case TwoFactorProviderType.Duo:
|
||||||
|
Loading…
Reference in New Issue
Block a user