JeNeSuisPasDave / authenticator

A HOTP/TOTP command line client for generating two-factor and multi-factor authentication codes, like Google Authenticator.
MIT License
80 stars 19 forks source link

Add bare output mode, Enable ~/.passcode usage #11

Open ibexa-yuna opened 3 years ago

ibexa-yuna commented 3 years ago

This PR contains code from @rirze to enable bare output and enable usage of ~/.passcode file, alongside my changes to exit after the first code is output, so that app can be used in conjunction with cli tools, like pbcopy on OSX.

Fixes #9

rirze commented 3 years ago

... I really didn't expect someone to pick up my fork and bring it back upstream. I understand your use case, as it's probably the same as mine, but storing the password in a plaintext file is very unsafe from a security perspective.

If you really want to merge this back into upstream, try to figure out a way to make this more secure.

ibexa-yuna commented 3 years ago

I do know it defeats the purpose of MFA, as you are literally putting all eggs in one basket. The thing is, with MFA enabled AWS does not provide any UI to authenticate from CLI in a "human-friendly way".

What I do is I link authenticator with aws-mfa and I have the luxury to do this, as AWS-enabled machine is dedicated and in a sterile environment. But not many people do...

I would really like to hear the feedback fro @JeNeSuisPasDave on this topic.