mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
allow multiple u2f challenges during 2fa login
This commit is contained in:
parent
7c3e0cba34
commit
9cd0bd5f7c
@ -98,14 +98,16 @@ export class TwoFactorComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const challenges = JSON.parse(params.Challenges);
|
const challenges = JSON.parse(params.Challenges);
|
||||||
if (challenges.length > 0) {
|
if (challenges != null && challenges.length > 0) {
|
||||||
this.u2f.init({
|
this.u2f.init({
|
||||||
appId: challenges[0].appId,
|
appId: challenges[0].appId,
|
||||||
challenge: challenges[0].challenge,
|
challenge: challenges[0].challenge,
|
||||||
keys: [{
|
keys: challenges.map((c: any) => {
|
||||||
version: challenges[0].version,
|
return {
|
||||||
keyHandle: challenges[0].keyHandle,
|
version: c.version,
|
||||||
}],
|
keyHandle: c.keyHandle,
|
||||||
|
};
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user