Saving and managing 2FA secrets and then getting the tokens are quite annoying, so this is my quick and easy fix. It's really easy to use, and convenient!
npm i -g mfa
- Copy the secret key from the service, let's call the service
example
. - Then, go to terminal and do:
mfa save example
That's it! Now, you can get the 2FA from now on like so.
mfa example
This will copy the token to your clipboard.
mfa ls