2F2Chrome

My wife & I migrated to iPhone a few year ago. Having previously never owned one, I grew accustomed to the seamless integration between iOS and macOS. A killer feature was the handling of two-factor authentication codes. The native system, coupled with an app called 2FHey, made the whole process a breeze. Recently my wife mentioned switching back to Pixel... and hey, "Happy wife, happy life" is the saying right? As we made the leap back to Android, I found myself missing that smooth 2FA experience. And with that, 2F2Chrome was born.

2F2Chrome is a Chrome extension designed to streamline the 2FA experience for users of Google Messages, bringing a touch of that iOS & macOS magic to Android and Chrome.

How it works

2F2Chrome operates by monitoring the Google Messages web interface for incoming 2FA codes. Here's a breakdown of its core functionality:

  1. Pattern Recognition: The extension uses a set of regular expressions to identify 2FA codes from various services. These patterns are stored in a patterns.json file, which can be easily updated to support new services or formats.
  2. Content Script: A content script runs on the messages.google.com domain, actively scanning new messages as they arrive. When a message matches one of our 2FA patterns, the script extracts the code.
  3. Clipboard Copy: Once a 2FA code is detected, 2F2Chrome automatically copies it to your clipboard, eliminating the need for manual transcription.
  4. User Interface: The extension provides a popup interface accessible from the Chrome toolbar. This interface displays the most recently captured code and offers quick access to copy it again if needed.
  5. QoL Features: OS-level Notifications, Code History, and Dark Mode (because everything needs dark mode)

Technical Implementation

2F2Chrome is built using standard web technologies:

  • HTML and CSS for the popup interface
  • JavaScript for core functionality
  • Chrome Extension APIs

Privacy and Security

Security is paramount when dealing with authentication codes. 2F2Chrome is designed with privacy in mind:

  • All code processing occurs locally within the user's browser.
  • No data is sent to external servers.
  • The extension requests only the minimum permissions necessary for its operation.
  • Code history, when enabled, is stored in the user's local Chrome storage and can be cleared at any time.
  • Review the code, it's published to Github.

Final Thoughts

2F2Chrome aims to strike a balance between security and convenience. Give 2F2Chrome a try and experience a smoother, more efficient 2FA process.