Skip to content

championswimmer/TwoFac

Repository files navigation

TwoFac logo

TwoFac


Open Source, Native, Cross-Platform 2FA App for Watch, Mobile, Desktop, Web and CLI!

Kotlin Compose Multiplatform

Android iOS watchOS Wear OS macOS Windows Ubuntu Web Chrome Extension Firefox Extension CLI macOS CLI Windows CLI Linux

two-fac-demo

ROADMAP

  • Common functionality
    • Add new accounts
    • Display accounts with 2FA codes
    • Save accounts to a storage
    • Backup & Restore via a backup transport
    • Export & Import accounts (encrypted with passkey)
    • Import from other 2FA apps
      • Authy (JSON format)
      • 2FAS (JSON format)
      • Ente (plaintext otpauth:// URIs)
  • Mobile App
  • Desktop App
  • Web Extension
  • CLI App
    • Add new accounts
    • Display 2FA codes with auto-refresh

Documentation

Development

Prerequisites

  • JDK 17+ (recommended: JDK 21)
  • Android SDK (if building Android targets)
  • Xcode (if building iOS targets on macOS)
  • Native toolchains for your platform (GCC/Clang for Linux, MSVC for Windows)

Project structure

TwoFac/
├── sharedLib/    # Shared 2FA library (TOTP/HOTP, crypto, storage)
├── cliApp/       # CLI application (Clikt-based, native binaries)
├── composeApp/   # Compose Multiplatform UI application
├── watchApp/     # Wear OS app
└── iosApp/       # iOS application wrapper

Common commands

# Baseline checks
./gradlew check

# Module tests
./gradlew :sharedLib:test
./gradlew :cliApp:test
./gradlew :composeApp:test

# Run desktop app
./gradlew :composeApp:run

# Run web app
./gradlew :composeApp:wasmJsBrowserDevelopmentRun

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages