A secure Chrome extension that stores and protects login credentials using your MetaMask wallet. EthSign Keychain leverages MetaMask Snaps to provide decentralized, encrypted password management directly in your browser.
EthSign Keychain is a browser extension that integrates with MetaMask to provide secure credential storage and autofill functionality. Instead of relying on centralized password managers, your credentials are encrypted and stored using your MetaMask wallet, giving you full control over your data.
- π Secure Storage: Credentials are encrypted using your MetaMask wallet
- π Auto-fill: Automatically detects and fills login forms
- πΎ Import/Export: Backup and restore your credentials
- π Multi-Site Support: Manage credentials for multiple websites
- π« Never Save Option: Exclude specific sites from password saving
- π Manual Entry Management: Add, edit, and delete credentials manually
- π Blockchain Integration: Leverages MetaMask Snaps for secure key management
- βοΈ Sync Options: Support for syncing credentials (AWS/Arweave)
The extension consists of several key components:
- Popup Interface (
src/App.tsx): Main React application for managing credentials - Content Script (
src/chromeServices/DOMContent.ts): Detects login forms and handles autofill - Background Service (
src/chromeServices/DOMBackground.ts): Manages extension lifecycle and messaging - MetaMask Snap Integration (
src/utils/snap.ts): Communicates with the keychain-snap for secure storage
- Connect - Initial MetaMask connection and snap installation
- Credentials - View and manage saved credentials for the current site
- Pending - Review credentials detected from form submissions before saving
- Edit Entry - Add or modify credential entries
- Never Save - Manage sites excluded from password saving
- Node.js (v16 or higher)
- npm or yarn
- MetaMask browser extension installed
- Chrome or Chromium-based browser
- Clone the repository:
git clone <repository-url>
cd keychain-extension- Install dependencies:
npm install- Build the extension:
npm run build- Load the extension in Chrome:
- Navigate to
chrome://extensions/ - Enable "Developer mode" (toggle in top-right)
- Click "Load unpacked"
- Select the
buildfolder from the project directory
- Navigate to
For production deployment:
npm run buildThe build process uses CRACO to customize the Create React App configuration and ensures proper Chrome extension compatibility.
Runs the app in development mode at http://localhost:3000. Note: For full functionality, you need to build and load as a Chrome extension.
Builds the extension for production to the build folder. The build is optimized and minified with:
- INLINE_RUNTIME_CHUNK disabled for Chrome extension compatibility
- Static assets properly configured for manifest v3
- Content scripts and background service worker compiled
Launches the test runner in interactive watch mode.
keychain-extension/
βββ public/
β βββ manifest.json # Chrome extension manifest v3
β βββ notifications.js # Notification handling
β βββ index.html # Popup HTML template
βββ src/
β βββ chromeServices/ # Chrome extension integration
β β βββ DOMContent.ts # Content script for form detection
β β βββ DOMBackground.ts # Background service worker
β βββ components/ # React UI components
β β βββ CredentialRow.tsx
β β βββ DisplayCredentials.tsx
β β βββ FileDropzone.tsx
β β βββ icons/ # SVG icon components
β βββ config/ # Configuration files
β β βββ index.ts
β β βββ snap.ts # MetaMask Snap ID and version
β βββ hooks/ # React hooks
β β βββ MetaMaskContext.tsx # MetaMask state management
β βββ pages/ # Main page components
β β βββ Connect.tsx # MetaMask connection page
β β βββ Credentials.tsx # Credential management page
β β βββ EditEntry.tsx # Add/edit credential page
β β βββ NeverSave.tsx # Never save sites management
β β βββ Pending.tsx # Pending credentials review
β βββ types/ # TypeScript type definitions
β β βββ index.ts
β β βββ snap.ts
β β βββ DOMMessages.ts # Chrome messaging types
β βββ ui/ # Reusable UI components
β β βββ forms/
β βββ utils/ # Utility functions
β β βββ autofill.ts # Form detection and autofill logic
β β βββ files.ts # Import/export functionality
β β βββ forms.ts # Form handling utilities
β β βββ snap.ts # MetaMask Snap API wrapper
β βββ App.tsx # Main application component
βββ craco.config.js # CRACO configuration
βββ tailwind.config.js # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
- Installation: User installs the extension and connects their MetaMask wallet
- Snap Installation: The extension installs the
keychain-snapinto MetaMask - Form Detection: Content script monitors web pages for login forms
- Credential Capture: When a form is submitted, credentials are captured and stored in "pending"
- User Approval: User reviews and saves pending credentials through the popup
- Auto-fill: When revisiting a site, the extension detects login forms and offers to auto-fill
- Encryption: All credentials are encrypted using keys derived from your MetaMask wallet
The extension connects to the MetaMask Snap defined in src/config/snap.ts:
export const SNAP_ID = "npm:keychain-snap";
export const SNAP_VERSION = "0.3.6";For local development with a custom snap:
export const SNAP_ID = "local:http://localhost:8081";- No Centralized Storage: Credentials never leave your control
- Wallet-Based Encryption: Uses MetaMask's secure key management
- Local Processing: All encryption/decryption happens locally
- Open Source: Code is transparent and auditable
- Manifest V3: Uses the latest Chrome extension security standards
- React 18: UI framework
- TypeScript: Type-safe development
- @metamask/providers: MetaMask integration
- Tailwind CSS: Styling framework
- react-dropzone: File import functionality
- lodash: Utility functions
chrome.tabs: Tab management and messagingchrome.storage: Local data persistencechrome.runtime: Background service worker communication
- Ensure MetaMask is installed and unlocked
- Check that the snap is installed (visit the Connect page in the extension)
- Reload the extension from
chrome://extensions/
- Check that the site is not in the "Never Save" list
- Ensure the form fields are detected (check console for errors)
- Verify MetaMask is connected and the snap is installed
- Clear node_modules and reinstall:
rm -rf node_modules && npm install - Ensure you're using Node.js v16 or higher
- Check that all peer dependencies are compatible
Contributions are welcome! Please ensure:
- Code follows TypeScript best practices
- Components are properly typed
- Chrome extension APIs are used correctly
- Changes are tested in both development and production builds
This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3). See the LICENSE file for details.
- Free Software: You have the freedom to run, modify, and distribute this software
- Source Code Sharing: If you modify this software and use it over a network, you must share your modifications with users
- Copyleft: Derivative works must also be licensed under AGPLv3
- No Warranty: The software is provided "as is" without any warranty
For more information, visit GNU Affero General Public License v3.0
- keychain-snap: The MetaMask Snap that handles secure credential storage
- MetaMask Snaps: https://metamask.io/snaps/
For issues, questions, or contributions, please open an issue on GitHub.