1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-13 01:58:44 +02:00

allow multiple u2f challenges during 2fa login

This commit is contained in:
Kyle Spearrin 2018-10-10 16:46:57 -04:00
parent 7c3e0cba34
commit 9cd0bd5f7c

View File

@ -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;