Securely Generating TOTP tokens with Emacs reddit / emacs ---------------------------------------------------------------------- mickeyp · 2022-10-19 19:29 ---------------------------------------------------------------------- mickeyp · 2022-10-19 19:33 There was a HN post the other day demonstrating [MinTOTP](https://github.com/susam/mintotp), a tiny TOTP generator in Python. I went looking for the equivalent in Emacs, and there's a fine "scratch your itch" solution out there [already](https://github.com/juergenhoetzel/emacs-totp), but it's perhaps a little bit hard to use out of the box. So in true Emacs tradition, I wrote up a few lines of code to make it all a bit nicer. Combine it with GPG and encrypting your files on disk (a topic I wrote about years ago), and you have a fairly seamless experience. The only thing left to do is writing a comint `comint-output-filter- functions` function to pick up on OTP prompts and auto-generate the totp (or at least pop up a completion.) ---------------------------------------------------------------------- HumanBrainMapper · 2022-10-20 04:22 Very cool. Thanks for sharing. ---------------------------------------------------------------------- unhammer · 2022-10-20 08:13 Nice, can we get this merged into Emacs? :) ^((insert "Your scientists were so preoccupied with whether or not they could" meme here)) ---------------------------------------------------------------------- berenddeboer · 2022-10-20 23:44 It's cool, but this probably defeats the entire purpose of 2FA. ---------------------------------------------------------------------- vaxdar · 2022-10-24 18:56 If you manage the keys badly, then yes, probably.