keepassxc-browser
keepassxc-browser copied to clipboard
[RFC] Workflow for adding new TOTP entry to the DB
Current steps to add a new TOTP entry to the DB
In an ideal case
- website offers "add manually" option where we can copy paste the paramaters into the "setup totp" dialogue
the not so ideal way
- download the QR code image or make a screenshot (e.g. if the QR code is SVG)
- run zbarimg on the file
- know which part of the cryptic string is what and what goes where
Expected Behavior
Integrate the the whole TOTP handling just as we have this "add new entry" popup when ever we see a login for the first time. The goal would be to make it more user friendly, especially for not so technical user.
Possible Solution
- click a button in keepassxc-browser drop down
- get the image:
- grab current tab image via chrome.desktopCapture (or like here e.g.) (more work for the QR decoder)
- Ideally we would want to select the region with the QR code (think region selection in an image editor)
- another option would be to use the same picker that the webdev tools use to select the image/element with the QR code. but we might have to rerender it to a canvas as some sites use SVG for their QR code
- let it run JS QR decoder
- send the config to the keepassxc via their browser protocol
A JS QR decoder might not be expecting a full screenshot, so the element picker would be very helpful if possible to avoid extra noise in the QR image.
We could just pipe the whole image to the C++ code and use libzbar there ;) runs
There is an equivalent request for the application itself.
The Authenticator Extension implements that feature and could maybe be an inspiration.