mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +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);
|
||||
if (challenges.length > 0) {
|
||||
if (challenges != null && challenges.length > 0) {
|
||||
this.u2f.init({
|
||||
appId: challenges[0].appId,
|
||||
challenge: challenges[0].challenge,
|
||||
keys: [{
|
||||
version: challenges[0].version,
|
||||
keyHandle: challenges[0].keyHandle,
|
||||
}],
|
||||
keys: challenges.map((c: any) => {
|
||||
return {
|
||||
version: c.version,
|
||||
keyHandle: c.keyHandle,
|
||||
};
|
||||
}),
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user