TOTP QR format:otpauth://totp/<service>:<login>?PARAMETERSExample:
otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example
Implementation
Currently two ways of TOTP QR read is implemented:
Create a screenshot of TOTP QR
Screenshot is detected when user is in MMM and tries to find the credential provided in TOTP URI and add TOTP for credential, if service or login is not found after user confirmation add service/login and TOTP.
In MMM screenshot is detected and creates non-exising credential:ExampleProcess clipboard data after entering MMM:Example
Screenshot the TOTP QR image and enter MMM, after entering TOTP is detected from clipboard.
In TOTP QR service is gmail, this service is not available in DB, but it has a gmail.com service, so during scan QR Moolticute asks the user if they want to add it for this service.
Scan QR for given credential
For "Setup TOTP Credential" a QR option is added which will fill the available datas from TOTP QR image:
Example
TODOs
~Improve UI for TOTP reading
For testing I added a Scan QR button for reading TOTP QR and processing it.~
~Add solution to paste QR image from clipboard~
Improve dialog texts during adding TOTP
~TOTP storage for credential with multiple domain fails. (not related to QR read),~ fixed with #1222
~Test with other TOTP examples~
~Test with older unix build~ (Works on xenial, bionic)~
Note
On Mac there is an issue with processing clipboard dataChanged signal (https://doc.qt.io/qt-6/qclipboard.html#dataChanged).
As a workaround I implemented a check in MMM, when Moolticute app is activated in MMM then I am checking the content of the clipboard. An image is only processed once.
Integrated https://github.com/ftylitak/qzxing library for reading QR code. Added wrapper for TOTP reading.
Implementation
TOTP QR format:
otpauth://totp/<service>:<login>?PARAMETERS
Example:otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example
Implementation
Currently two ways of TOTP QR read is implemented:
Create a screenshot of TOTP QR Screenshot is detected when user is in MMM and tries to find the credential provided in TOTP URI and add TOTP for credential, if service or login is not found after user confirmation add service/login and TOTP. In MMM screenshot is detected and creates non-exising credential: Example Process clipboard data after entering MMM: Example Screenshot the TOTP QR image and enter MMM, after entering TOTP is detected from clipboard. In TOTP QR service is gmail, this service is not available in DB, but it has a gmail.com service, so during scan QR Moolticute asks the user if they want to add it for this service.
Scan QR for given credential For "Setup TOTP Credential" a QR option is added which will fill the available datas from TOTP QR image: Example
TODOs
Note
On Mac there is an issue with processing clipboard dataChanged signal (https://doc.qt.io/qt-6/qclipboard.html#dataChanged). As a workaround I implemented a check in MMM, when Moolticute app is activated in MMM then I am checking the content of the clipboard. An image is only processed once.