Kunzisoft / KeePassDX

Lightweight vault and password manager for Android, KeePassDX allows editing encrypted data in a single file in KeePass format and fill in the forms in a secure way.
https://www.keepassdx.com/
GNU General Public License v3.0
4.32k stars 261 forks source link

Accept otpauth URIs from binary eye #893

Closed thomassth closed 3 years ago

thomassth commented 3 years ago

Right now there is no in built QR code scanner for setting up new 2FA codes.

A workaround is to use third-party QR code scanner Eg. Binary Eye to retrieve the otpauth URI from QR code.

NOTE: problem identified as something else, this quoted part is now irrelevant. See comments below

However there is no support for opening otpauth URI. I need to copy it manually and set up the rest in KeepassDX.

Proposed workflow:

A website presents the otpauth URI in QR code:
otpauth://totp/{WEBSITE}:{ACCOUNT}?secret={SECRET}%issuer={WEBSITE DOMAIN}

User scans and clicks the link in QR scanner app, KeepassDX opens and prompt for authentication.

(Or create an in-app QR scanner for this purpose)

After unlocking the vault, the address is parsed into an entry

Title: {WEBSITE}
Username: {ACCOUNT}
otp: (directly copy the entire otpauth address)

User confirms the entry and saves it.
J-Jamet commented 3 years ago

Right now there is no in built QR code scanner for setting up new 2FA codes.

This is normal, because it would be necessary to include a library and it is one format among others, I prefer that KeePassDX only manages the links shared by the dedicated applications, which manage coded images much better.

A workaround is to use third-party QR code scanner Eg. Binary Eye to retrieve the otpauth URI from QR code. However there is no support for opening otpauth URI. I need to copy it manually and set up the rest in KeepassDX.

This functionality is normally already included. Otpauth URIs are already managed in KeePassDX when sharing a link from another application.

I tested with QR & Barcode scanner and it works. Not sure with Binary Eye, to be checked.

Code : https://github.com/Kunzisoft/KeePassDX/blob/60ba058515144b247018df7bcf55b53d0d6b0efd/app/src/main/AndroidManifest.xml#L161

thomassth commented 3 years ago

After some tests, I found that binary eye had a different way to parse otpauth. Should be related to this file, but I don't understand much: BinaryEye/app/src/main/kotlin/de/markusfisch/android/binaryeye/actions/otpauth/OtpauthAction.kt If you share the otpauth as plain text over to KeePassDX, the function works just fine.

thomassth commented 3 years ago

Apparently, after an update at Binary Eye, the function works as intended. I'll close the issue here.