When I realized I could use KeePassXC to handle Two-Factor Authentications (2FA) I got the urgency to extract my keys from the files exported from FreeOTP+ (available on Google Play and F-Droid stores).
- Export data from FreeOTP+ (touch on vertical ellipsis "⋮" on top of the screen, "Export" and choose a file name and a location where to store it);
- Transfer the exported file to your computer;
- Run
freeotp_fetch_keys.py <your_saved_file.json>
contained in this repository; it will attempt to identify each TOTP key with a friendly name. If you see any<unknown>
labels, please contribute to this project; - Copy the string that follows the label;
- Open KeePassXC file where to place the access credentials;
- Right click over the entry to which we want to add 2FA and choose: "Time-based one-time password" > "Set up TOTP...";
- Paste the copied value from step 4 into "Key" field and choose "Default RFC 6238 token settings";
- Validate that both FreeOTP+ and KeePassXC (right-click, "Time-based one-time password" > "Show TOTP") show the same values.
This project is available under MIT License and it's based on a GIST published by @jleclanche.