Live data from Hacker News

Show HN: Auto2FA – Autofill SMS 2FA codes anywhere

github.com

1–9 of 9 posts

Re: Show HN: Auto2FA – Autofill SMS 2FA codes anywhere

#2
Auto2FA is a menu bar app for macOS Ventura to help autofill SMS 2FA codes. When you receive a 2FA code, it will copy it to your clipboard automatically and send a local notification to notify you the code is ready to paste. I’ve always used Safari which can autofill SMS 2FA codes automatically, but lately I’ve been using Chromium browsers for dev tools, and this is my most missed feature.

The app is written entirely in Swift and has a binary size of ~550KB. I avoided using any third-party library because the app can access your local iMessage SQLite DB. The app uses modern Swift features including SwiftUI and async/await. The app uses a custom, redux-like architecture (although the reducer is not currently side-effect free). The app could be written for older macOS versions, but that would have prevented using some of the newer SwiftUI features for menu bar apps.

The DEVELOPERS.md file includes some technical details on how to implement this from scratch, plus some links to related projects and useful blog posts. All in, there are just ~800 lines of code.

Re: Show HN: Auto2FA – Autofill SMS 2FA codes anywhere

#3

Auto2FA is a menu bar app for macOS Ventura to help autofill SMS 2FA codes. When you receive a 2FA code, it will copy it to your clipboard automatically and send a local notification to notify you the code is ready to paste. I’ve always used Safari which can autofill SMS 2FA codes automatically, but lately I’ve been using Chromium browsers for dev tools, and this is my most missed feature. The app is written entirely…

thanks for sharing... works like a charm.

Re: Show HN: Auto2FA – Autofill SMS 2FA codes anywhere

#5

My macbook & iPhone automatically does this. Isn’t it the default behaviour? When I receive sms with the code, my mac suggest the code as autofill in the form.

For iPhone it's the default behavior. On Mac, it's the default behavior for Safari, and it's possible for Mac apps to support autofill since Big Sur. The main benefit of this is it works for Chrome and Chromium browsers which don't support autofill on Mac.

Re: Show HN: Auto2FA – Autofill SMS 2FA codes anywhere

#6

My macbook & iPhone automatically does this. Isn’t it the default behaviour? When I receive sms with the code, my mac suggest the code as autofill in the form.

For iPhone it's the default behavior. On Mac, it's the default behavior for Safari, and it's possible for Mac apps to support autofill since Big Sur. The main benefit of this is it works for Chrome and Chromium browsers which don't support autofill on Mac.

Oh, that explains it! Is Firefox supported aswell?

Re: Show HN: Auto2FA – Autofill SMS 2FA codes anywhere

#8

Earlier quoted context omitted.

For iPhone it's the default behavior. On Mac, it's the default behavior for Safari, and it's possible for Mac apps to support autofill since Big Sur. The main benefit of this is it works for Chrome and Chromium browsers which don't support autofill on Mac.

Oh, that explains it! Is Firefox supported aswell?

Yes, Firefox will work as well (I just tested it to be sure). This app just copies the code to the clipboard, then you can press cmd+v to paste it into the field. Once it's copied to your clipboard, you can paste it into any app the needs it, including Firefox.

Re: Show HN: Auto2FA – Autofill SMS 2FA codes anywhere

#9

Can we please stop using SMS for 2FA? SIM Swapping is dangerous and far too easy. Use Google Auth or Authy or another TOTP at minimum, a hardware key like a Yubikey is your best option.

Yes, it would be ideal if TOTP was available everywhere and SMS 2FA was not required. Unfortunately, some websites only offer SMS 2FA. I updated the README to highlight that SMS 2FA should only be used when there's no other option, and I called out 1Password OTPs, Google Authenticator, and Authy as better options.