Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ async function handleMessage(settings, message, sendResponse) {
}
break;
case "copyOTP":
if (settings.enableOTP) {
if (settings.enableOTP || settings.stores[message.login.store.id].settings.enableOTP) {
try {
if (!message.login.fields.otp) {
throw new Exception("No OTP seed available");
Expand Down Expand Up @@ -982,7 +982,10 @@ async function parseFields(settings, login) {
}

// preprocess otp
if (settings.enableOTP && login.fields.hasOwnProperty("otp")) {
if (
(settings.enableOTP || settings.stores[login.store.id].settings.enableOTP) &&
login.fields.hasOwnProperty("otp")
) {
if (login.fields.otp.match(/^otpauth:\/\/.+/i)) {
// attempt to parse otp data as URI
try {
Expand Down
3 changes: 2 additions & 1 deletion src/popup/detailsInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ function view(ctl, params) {
]),
(() => {
if (
this.settings.enableOTP &&
(this.settings.enableOTP ||
this.settings.stores[login.store.id].settings.enableOTP) &&
login.fields.otp &&
login.fields.otp.params.type === "totp"
) {
Expand Down