https://github.com/openpeeps/twofa
Generate TOTP, HOTP, QR codes. Based on OpenSSL
https://github.com/openpeeps/twofa
2fa hotp nim qrcode totp twofactor
Last synced: 3 days ago
JSON representation
Generate TOTP, HOTP, QR codes. Based on OpenSSL
- Host: GitHub
- URL: https://github.com/openpeeps/twofa
- Owner: openpeeps
- License: mit
- Created: 2026-04-01T15:32:39.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-31T21:14:18.000Z (10 days ago)
- Last Synced: 2026-05-31T23:12:58.646Z (9 days ago)
- Topics: 2fa, hotp, nim, qrcode, totp, twofactor
- Language: Nim
- Homepage:
- Size: 67.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A tiny package for generating 2FA QR codes and TOTP/HOTP codes in Nim
nimble install twofa
## 😍 Key Features
- 🔐 Generate TOTP and HOTP codes
- 📱 Create QR codes for easy setup with authenticator apps
> [!NOTE]
> This library is built on top of the [qr](https://github.com/ThomasTJdev/nim_qr) for QR code generation.
## Examples
Check out the [tests/*.nim](https://github.com/openpeeps/twofa/tree/main/tests) folder for examples of how to use the library.
### TODO
Currently you can use [otp](https://github.com/OpenSystemsLab/otp.nim) to verify TOTP and HOTP codes, but I plan to add that
functionality directly into this library in the future.
### ❤ Contributions & Support
- 🐛 Found a bug? [Create a new Issue](https://github.com/openpeeps/twofa/issues)
- 👋 Wanna help? [Fork it!](https://github.com/openpeeps/twofa/fork)
### 🎩 License
MIT license. [Made by Humans from OpenPeeps](https://github.com/openpeeps).
Copyright OpenPeeps & Contributors — All rights reserved.