1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

feat: Add option to auto-copy TOTP code when page auto fills credentials

This commit is contained in:
Tomer Shvueli
2021-02-20 14:48:54 -05:00
parent 8d2e436a05
commit 72d0a439d2
4 changed files with 36 additions and 1 deletions

View File

@@ -254,10 +254,12 @@ export default class AutofillService implements AutofillServiceInterface {
}
}
const shouldCopyTotpOnAutoFill = await this.totpService.isAutoCopyOnAutoFillEnabled();
const totpCode = await this.doAutoFill({
cipher: cipher,
pageDetails: pageDetails,
skipTotp: !fromCommand,
skipTotp: !fromCommand && !shouldCopyTotpOnAutoFill,
skipLastUsed: !fromCommand,
skipUsernameOnlyFill: !fromCommand,
onlyEmptyFields: !fromCommand,