Comments (4)
It's a good idea to support entry-specific input names for certain fields. Implementation-wise this would be easiest like this:
AephieryZ2Ya
login: kevin
url: example.com
otpauth://totp/Example:[email protected]?secret=JBSWY3DPEHPK3PXP&issuer=Example
pin: 1234
loginkey: PASSFF_INPUT_OTP
fancyinput: PASSFF_INPUT_LOGIN
Then, if the user tells PassFF to fill the form, it would loop through the "other" fields like it's currently implemented:
Lines 257 to 261 in 2f3fb44
But if it finds that the value
passwordData._other[matching]
is a certain keyword like PASSFF_INPUT_LOGIN
it would fill the value stored in the login field, and if the value is the keyword PASSFF_INPUT_OTP
it would fill the otp token that has just been generated (currently, an otp token is generated regardless of the existence of a matching input element on the current web page):
let matching = findIntersection(otherNames, inputNames);
if (matching !== undefined) {
let value = passwordData._other[matching];
if (value == "PASSFF_INPUT_OTP") {
value = passwordData.otp;
} else if (value == "PASSFF_INPUT_LOGIN") {
value = passwordData.login;
} else if (value == "PASSFF_INPUT_PASSWORD") {
value = passwordData.password;
}
writeValueWithEvents(input, value);
return;
}
from passff.
This looks great, and while my initial thought was to reuse YAML references, let's not overcomplicate things, especially since we're not using YAML.
The only thing I'll say is s/INPUT/FIELD/
since we're not really talking input, but fields. But either way, this would be great to have, and I'll be the first to test.
from passff.
Either of INPUT or FIELD in the flag name is okay with me. The field name is both the name of a field and of an input. The flag then tells you that the corresponding "input" is actually to be used for a different purpose (like OTP or LOGIN), and it also tells you at the same time to use the value stored in a different "field" (like OTP or LOGIN).
from passff.
Related Issues (20)
- Make keyboard shortcut field case insensitive HOT 2
- Document keyboard shortcut syntax HOT 2
- Keyboard shortcut to fill form HOT 3
- After autofill, focus the password field HOT 3
- Set default keyboard shortcut to the same one as the most popular password manager HOT 2
- Do not display warning when pass is named with an IP address ± port HOT 2
- Upon showing passff window, auto-select the first matching contextual item rather than search
- With first pass selected, up arrow should put focus in search box
- Improve error handling if user cancels the decryption operation HOT 18
- Improve error handling if there is no URL in the database
- Copy OTP token from menu HOT 1
- Blank username gets ignored by passff, but is ok when listed from pass cli HOT 7
- It work with the terminal but not a shortcut in hyprland HOT 3
- Fields not filled on raptorpcs.com
- Not working on bahn.de HOT 4
- Hard to use on elster.de HOT 2
- Support input fields in shadow DOM HOT 9
- Suddenly failed to execute the host app on macOS
- Hide PassFF in toolbar HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from passff.