Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vedhavyas/twothy
Two factor authenticator for CLI
https://github.com/vedhavyas/twothy
2fa 2factor authenticator google-authenticator mfa
Last synced: about 10 hours ago
JSON representation
Two factor authenticator for CLI
- Host: GitHub
- URL: https://github.com/vedhavyas/twothy
- Owner: vedhavyas
- License: unlicense
- Created: 2018-01-05T11:21:50.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-25T01:41:41.000Z (almost 2 years ago)
- Last Synced: 2024-11-09T20:37:36.166Z (3 months ago)
- Topics: 2fa, 2factor, authenticator, google-authenticator, mfa
- Language: Go
- Homepage:
- Size: 57.6 KB
- Stars: 39
- Watchers: 7
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
- Security: security.go
Awesome Lists containing this project
- awesome-repositories - vedhavyas/twothy - Two factor authenticator for CLI (Go)
README
# Twothy
[![Build Status](https://travis-ci.org/vedhavyas/twothy.svg?branch=master)](https://travis-ci.org/vedhavyas/twothy)
[![GitHub tag](https://img.shields.io/github/tag/vedhavyas/twothy.svg)](https://github.com/vedhavyas/twothy/tags)
[![License](https://img.shields.io/badge/license-Unlicense-blue.svg)](http://unlicense.org/)
[![GitHub issues](https://img.shields.io/github/issues/vedhavyas/twothy.svg)](https://github.com/vedhavyas/twothy/issues)
![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)
[![GitHub pull requests](https://img.shields.io/github/issues-pr/vedhavyas/twothy.svg)](https://github.com/vedhavyas/twothy/pulls)
[![Website](https://img.shields.io/website-up-down-green-red/http/vedhavyas.com.svg?label=my-website)](https://vedhavyas.com)Twothy is a Two-factor authenticator for CLI. The project is a reference implementation of [RFC 6238](https://tools.ietf.org/html/rfc6238) and is compatible with Google Authenticator.
The project was born out of frustration to get OTP from my Mobile and lack of control over and backup of Secrets.
With a simple configuration, twothy can work across multiple devices without the need to regenerate the secrets for each 2FA enabled accounts. More [here](#backup)## Getting Started
Installation assumes that you have Go environment configured.
### InstallingGo get the project with following command
```
go get -u github.com/vedhavyas/twothy/cmd/twothy/...
```## Running the tests
Once inside project' folder, simply run `make test` to run the tests.
### Usage
### Configuring twothy
Twothy requires you to provide a path to store the accounts. Configuration can be triggered by
```
>> twothy configure
Welcome to twothy!!
Enter the path to store your 2FA accounts.
I will create 'twothy_accounts' folder at the provided path.
If you are restoring accounts, provide path to 'twothy_accounts'.
Path(/Users/vedhavyas):
```
Once you enter path, which defaults to user's home directory if not given, twothy will store all the accounts there.
Configure will be triggered if any other action is called ex: add#### Adding an account
Adding account requires Issuer, Label and the secret Key.
```
>> twothy add google test MZZWCLDCOZSGMYTKONSGM===
Password(to encrypt the account):
test@google: 168339
```#### Generating OTPs
Generating OTP for all accounts
```
>> twothy otp
Password(to decrypt the account):
test@google: 772912
```Generating OTPs for all accounts belonging to an issuer
```
>> twothy otp google
Password(to decrypt the account):
test@google: 017934
```Generating OTP for an account matching issuer and label
```
>> twothy otp google test
Password(to decrypt the account):
test@google: 917472
```## Security
Twothy uses AES to encrypt your accounts. It doesn't cache any passwords and requires password to add account and generate OTP.## Backup
I use google drive to backup my 2FA accounts by configuring twothy to save accounts inside Google Drive folder.
You are free to use your favourite backup service to achieve something similar## Built With
* [Go](https://golang.org/)
* [Glide](https://glide.sh/) - Dependency Management
* [HomeDir](https://github.com/mitchellh/go-homedir) - Used to get User's home directory
* [Crypto](https://golang.org/x/crypto) - Used to get password from terminal securely## Contributing
PRs, Issues, and Feedback are very welcome and appreciated.
## Versioning
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/vedhavyas/twothy/tags).
## Authors
* **Vedhavyas Singareddi** - [Vedhavyas](https://github.com/vedhavyas)
## License
This project is licensed under the Unlicense - see the [LICENSE](LICENSE) file for details