- Start with the web version (Vite + React)
- We already have a
manifest.json file in our public folder
- Configure the display for either Popup or "New Tab" override
- Need to make sure a secure domain is available to establish credentials
Options for zero-account WebAuthn:
- The Offscreen Documents API (Recommended): Chrome extensions allow you to spin up a hidden, background DOM instance called an "Offscreen Document." You can load a minimal, secure https:// page from your Netlify domain in the background solely to handle the WebAuthn biometric handshake, then pass the authentication token back to your extension via standard message passing.
- The Hybrid Approach: Keep the extension UI entirely local for instant loading, but point your authentication requests to your hosted Netlify app. When a user clicks "Login," it opens a pinned tab to your secure site to handle the biometric unlock, then securely saves the session token locally.
Browser Storage:
localStorage is a temp cache, so should use chrome.storage.local instead for profile-level permanence
// Instead of: localStorage.setItem('project_data', data);
// Use the Chrome Extension API:
chrome.storage.local.set({ project_data: data }, () => {
console.log('Data securely saved locally in Chrome.');
});
```
manifest.jsonfile in our public folderOptions for zero-account WebAuthn:
Browser Storage:
localStorageis a temp cache, so should usechrome.storage.localinstead for profile-level permanence