-
Notifications
You must be signed in to change notification settings - Fork 60
Description
At the moment, Browserpass is hardcoded to only recognize a few specific lines that are shown as fields:
browserpass-extension/src/helpers/base.js
Lines 11 to 17 in f4fffcd
| const fieldsPrefix = { | |
| secret: ["secret", "password", "pass"], | |
| login: ["login", "username", "user"], | |
| openid: ["openid"], | |
| otp: ["otp", "totp"], | |
| url: ["url", "uri", "website", "site", "link", "launch"], | |
| }; |
The result ist that additional lines that have a <key>: <value> format are currently not displayed as fields:
I propose implementing a setting (by default it should probably be turned off) that also allows such lines to be parsed and then presented as fields, like in this mockup:
I would parse it in such a way that only lines that contain at least one : are recognized and that any text before the first : is interpreted as key, and any text after the first : is recognized as value. I would trim both key and value, so all variants like <key>: <value>, <key>:<value> or <key> : <value> would work.
Display-wise, as you can see from the mockup, I would allow the labels to take up more space just for these additional fields, with a maximum width and ellipsis should the key name be longer than that.
Use case: many services require dealing with additional fields where it would be good to be able to easily copy them to the clipboard directly from Browserpass. E.g., in the context of GitHub, that could be personal access tokens.
If there is interest in this, I can probably implement it and make a PR.
Question: a few other pass-compatible tools already implement this and some (like Pass for iOS) also have YAML-like multiline field support. Is this also something that would be desirable here or should support be strictly limited to single-line fields in <key>: <value> format?