mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-21 11:35:34 +01:00
fix: totp autofill fill single digits if one field per digit exist (#11630)
This commit is contained in:
parent
18f7d64a6d
commit
690e175b1d
@ -940,13 +940,16 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
|
||||
if (options.allowTotpAutofill) {
|
||||
await Promise.all(
|
||||
totps.map(async (t) => {
|
||||
totps.map(async (t, i) => {
|
||||
if (Object.prototype.hasOwnProperty.call(filledFields, t.opid)) {
|
||||
return;
|
||||
}
|
||||
|
||||
filledFields[t.opid] = t;
|
||||
const totpValue = await this.totpService.getCode(login.totp);
|
||||
let totpValue = await this.totpService.getCode(login.totp);
|
||||
if (totpValue.length == totps.length) {
|
||||
totpValue = totpValue.charAt(i);
|
||||
}
|
||||
AutofillService.fillByOpid(fillScript, t, totpValue);
|
||||
}),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user