Skip to content

A cross-platform OTP app that runs from a 2FAS JSON export and supports grouping

License

Notifications You must be signed in to change notification settings

henricook/LibreOTP

Repository files navigation

LibreOTP

LibreOTP is a cross-platform desktop OTP code generator. Currently it works exclusively with an exported JSON file from 2FAS. It supports Windows, Mac and Linux and 2FAS features like grouping. Currently only TOTP keys are supported.

This project was borne from necessity. I needed a modern desktop application that would support 2FAS exports including grouping and search on Linux. It's rough, it's ready, but it does exactly what I needed it to do and might be what you need to!

Flutter means this app works on Windows, Mac and Linux.

Contributions and improvements are welcome, open an RFC: issue if you'd like to discuss a plan before getting started.

Preview

LibreOTP-Demo.mp4

Getting Started

  1. Generate an unencrypted export from your 2FAS app and download it to your desktop machine, call it data.json.
    • 💡 Improvement opportunity: Support encrypted exports
  2. Put this file in a folder called 'LibreOTP' in your system documents directory. This is the hard coded location where the app will search for it e.g. on my linux system that's /home/henri/Documents/LibreOTP/data.json. On other platforms the document directory is:
    • Windows: C:\Users\<Username>\Documents\LibreOTP\data.json
    • MacOS: /Users/<Username>/Library/Containers/com.henricook.libreotp/Data/Documents/LibreOTP/data.json (sorry, MacOS Sandboxing requirements make this ugly. You'll need to create this path.)
    • Linux: /home/<Username>/Documents
  3. Download the appropriate binary/package for your OS from the Releases page
    • For source releases: If needed, unpack the zip, it's rough and ready right now but there'll be a folder called 'bundle' in there that you can switch to. On Linux to run the app you'd now do:
      • chmod +x ./LibreOTP
      • ./LibreOTP
    • For the deb: dpkg -i libreotp_VERSION.deb, a desktop entry should appear in your launcher
  4. Enjoy! And don't forget to ⭐ Star the repository to encourage further updates.

Limitations

  • If data.json isn't in the right place, or its malformed, the crash will be quick and unhandled.
  • There's not really much error handling at all.

Building Deb Packages

  1. Run flutter build linux
  2. Move the contents of build/linux/x64/release/bundle to deb/libreotp_VERSION/opt/libreotp/
  3. cd to deb/
  4. Run dpkg-deb --build libreotp_VERSION, the deb appears in the same directory.
  5. Install with sudo dpkg -i libreotp_VERSION.deb

Credit

Core layout of the app is heavily inspired by otpclient which I liked but I found lacked grouping. Being written in C, I didn't find it particularly easy to contribute to either.

The Flutter docs are great and along with IntelliJ's starter project meant I got up and running really fast. Coupled with copious amounts of GPTing I went from concept to version 0.1 in just 3 hours with no prior knowledge of Flutter or Dart.

Roadmap / ideas

  1. Supported encrypted dumps so that I don't need to leave my secrets unencrypted on disk
  2. (Big one) Sync with Google Drive
  3. Better installers
  4. Automated release pipeline with tagging and asset generation

About

A cross-platform OTP app that runs from a 2FAS JSON export and supports grouping

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published