uOTP : simple TOTP extension for firefox
uOTP : simple TOTP extension for firefox

uOTP β Get this Extension for π¦ Firefox (en-US)

cross-posted from: https://lemmy.ml/post/12744832
As I updated the version to 1.4.0 , adding the 'import' feature I am sharing this here.
I made this extension because I couldn't find one that wouldn't ask for too much permissions (such as accessing all websites data).
Eventually I found it nice to have a TOTP that can really be audited, the code is 649 lines of JS, 214 CSS and 52 HTML. Feel free to fork, copy part of it, contribute or just request fix/features.
I have used it for more than a year every day and it works nicely.
I struggle to think of a situation where I would willingly undermine TOTP security by storing the secrets in my web browser.
Before using this for anything you can't afford to lose, I suggest thinking twice. And then twice again.
Edit to elaborate:
Web browsers are probably the single most targeted component in a desktop computer, have an enormous attack surface, and suffer from an unending stream of vulnerabilities and exploits discovered practically every month. Storing your 2FA secrets there is akin to putting a second lock on your door and hiding the key under the doormat.
And no, encrypting the secrets in the browser for storage-at-rest does not solve this problem, because it also delegates decryption to the browser. That means an exploited browser can access all of your secrets as soon as you request a TOTP from any of them. Closing it won't help, because an exploited browser can trivially save or give away a copy of the password you entered, or the decryption key that was generated from it, or the secrets themselves, so your secrets are then compromised forever.
2FA generators are generally built as stand-alone programs for good reason. Even the ones that offer a browser extension don't let it access the secret storage.
Really, think twice before depending on this design for anything important.
It's also an extension with 1 review, by a no-name developer, with only 12 installs... definitely would trust that...
Well this is 600 lines of code, if you cannot audit that you can indeed ignore it for now. Once again this is the only auditable code out there and not asking for unrelated permissions.
Every software started with 0 reviews, by a no-name developer, with only 1 installs.