A secure Chrome extension for managing 2FA TOTP codes with autofill capabilities. Store credentials, generate time-based one-time passwords, and autofill login forms with username, password, and 2FA codes.
Version: 1.1.0 Created by: Ervin (dev@bit2soft.com)
- π Secure Storage - Accounts encrypted with AES-256-GCM using your master password
- β‘ Smart Autofill - Automatically detect and fill login forms with username, password, and 2FA codes
- π± QR Code Support - Scan QR codes to quickly add 2FA accounts
- π Auto-Refresh - TOTP codes refresh automatically with visual countdown timers
- βοΈ Chrome Sync - Optional cloud sync across devices using Chrome's built-in sync storage
- π― Domain Matching - Intelligent matching of accounts to websites
- πΎ Backup & Restore - Export/import encrypted vault backups
- π Framework Compatible - Works with React, Vue, Angular, and vanilla JavaScript forms
- Create Master Password - Set up a master password to encrypt your vault
- Add Accounts - Manually enter account details or scan QR codes
- Store Credentials - Save usernames, passwords, and 2FA secrets (all optional)
- Autofill Forms - Extension detects login forms and shows autofill button
- Generate TOTP Codes - Time-based one-time passwords generated locally following RFC 6238
Your data security is paramount. The extension uses industry-standard encryption:
- Vault Encryption: AES-256-GCM (Advanced Encryption Standard, 256-bit key)
- Key Derivation: PBKDF2 with 100,000 iterations using SHA-256
- Master Password Hash: SHA-256 with salt for verification
- TOTP Generation: HMAC-SHA1 following RFC 6238 and RFC 4226 standards
- Client-Side Only - All encryption/decryption happens locally in your browser
- No Password Recovery - Master password hash cannot be reversed (use backup files)
- In-Memory Cache - Decrypted accounts stored in memory only while vault is unlocked
- Auto-Lock - Optional automatic vault locking after inactivity
- Clipboard Timeout - Automatic clipboard clearing after copying codes
Encryption: AES-256-GCM
βββ Algorithm: AES (Advanced Encryption Standard)
βββ Key Size: 256 bits
βββ Mode: GCM (Galois/Counter Mode) - provides authentication
βββ IV: 12 random bytes per encryption (unique per operation)
βββ Salt: PBKDF2 with 100,000 iterations
Master Password Verification:
βββ SHA-256(password + "2fa-manager-salt")
-
Clone this repository or download ZIP
git clone https://github.com/sirdree/2fa-manager.git
-
Open Chrome and navigate to
chrome://extensions/ -
Enable "Developer mode" (toggle in top right)
-
Click "Load unpacked" and select the extension directory
-
The extension icon will appear in your toolbar
Method 1: QR Code (Recommended)
- Click extension icon β "Add Account"
- Click "Scan QR Code"
- Click "Open Camera" and scan the QR code
- Account is automatically configured
Method 2: Manual Entry
- Click extension icon β "Add Account"
- Enter account details:
- Issuer/Service (e.g., "Google", "GitHub")
- Account Name (e.g., "user@example.com")
- Username (optional - for autofill)
- Password (optional - for autofill)
- 2FA Secret Key (Base32 format)
- Navigate to a login page
- Extension automatically detects forms
- Green button appears if account match found
- Click the button or use keyboard shortcut:
Ctrl+Shift+Y(Windows/Linux) orCmd+Shift+Y(Mac) - Fields are filled automatically
Sync your encrypted vault across devices using Chrome's built-in sync:
- Go to extension Settings β Cloud Sync
- Click "Enable Sync"
- Click "Upload to Cloud" to backup
- On other devices, click "Download from Cloud" to restore
Features:
- Uses Chrome Sync Storage (100KB limit)
- Automatic compression for large vaults
- Configurable auto-sync intervals (5m to 24h)
- Intelligent merge when conflicts detected
- End-to-end encrypted with your master password
- Vanilla JavaScript - No build step required
- Chrome Extension Manifest V3 - Latest extension platform
- Web Crypto API - Native browser cryptography
- Chrome BarcodeDetector API - QR code scanning
- Chrome Storage API - Local and sync storage
storage- Save encrypted vault locally and to Chrome syncactiveTab- Detect and fill forms on current tabscripting- Inject autofill functionalitytabs- Access tab information for domain matchingalarms- Schedule auto-sync operations<all_urls>- Access all websites for autofill (content script)
- Chrome: 89+ (required for BarcodeDetector API)
- Edge: 89+ (Chromium-based)
- Brave: 89+ (Chromium-based)
- Firefox: Not supported (uses Chrome-specific APIs)
All data is stored locally using Chrome's storage APIs:
- chrome.storage.local - Encrypted vault and settings (unlimited size)
- chrome.storage.sync - Optional cloud backup (100KB limit)
No external servers or third-party services are used.
- No Data Collection - Extension does not collect or transmit any data
- No Analytics - No tracking, no telemetry
- No External Requests - All operations are local
- Open Source - Code is publicly auditable
- Load extension in Chrome (see Installation)
- Make changes to code
- Go to
chrome://extensions/and click reload icon - Test changes in popup or on websites
- Popup: Right-click extension icon β Inspect popup
- Background: chrome://extensions/ β Service worker β Inspect
- Content Script: Page DevTools β Console
- Storage: Service worker β Application tab β Storage
- QR Scanning: Requires BarcodeDetector API (Chrome 89+)
- Form Detection: Heuristic-based, may miss highly customized forms
- Service Worker: May terminate after 30s inactivity (extension includes keep-alive)
- Chrome Sync Limit: 100KB for cloud backups (β200-500 accounts depending on data)
Contributions are welcome! Please feel free to submit issues or pull requests.
If you find this extension helpful, consider supporting development:
This project is open source. See repository for license details.
- GitHub Repository: https://github.com/sirdree/2fa-manager
- Report Issues: https://github.com/sirdree/2fa-manager/issues
- Donate: https://www.paypal.com/donate/?hosted_button_id=GJGXEPFP2SWFW
Never share your master password or backup files. The extension has no password recovery mechanism. If you forget your master password, you will need to reset the extension and lose all data. Always keep encrypted backups in a safe location.