Generate OTP from command line instead of Google Authenticator in mobile phone.
- Store secret in config file for example
~/.my-google-auth
- Run
java -jar my-google-auth.jar ~/.my-google-auth
- OTP will be copy to your clipboard and it will be valid for 30 seconds.
- secret : Your secret key
- prefix-password (Optional) : Your static password. It will be prepend to OTP.
File name : .my-google-auth
secret: ''
prefix-password: ''
alias mga="java -jar ~/Apps/my-google-auth.jar ~/.my-google-auth"
This is the library that I use for generating OTP : https://github.com/aerogear/aerogear-otp-java