Complete browser extension gRPC flow
This commit is contained in:
@@ -50,6 +50,8 @@ Build the bridge:
|
||||
go build ./cmd/keepassgo-browser-bridge
|
||||
```
|
||||
|
||||
On Linux desktop builds, KeePassGO now refreshes the user-scoped native messaging manifests on launch. That automatic update always installs the Firefox manifest and also installs Chrome or Chromium manifests when it finds an installed `KeePassGO Browser` extension in that browser profile. The Arch package also ships the extension assets under `/usr/share/keepassgo/browser-extension/`.
|
||||
|
||||
Install a Firefox native messaging manifest:
|
||||
|
||||
```bash
|
||||
@@ -81,10 +83,38 @@ Firefox:
|
||||
|
||||
Chromium / Chrome:
|
||||
|
||||
1. Load `browser/extension/` with `manifest.chromium.json`.
|
||||
2. Note the extension id the browser assigns.
|
||||
3. Install the native host manifest with that extension id.
|
||||
4. Configure the gRPC address and API token in the extension settings page.
|
||||
1. Load a Chromium manifest based on `browser/extension/manifest.chromium.json`, or install the published extension when that distribution exists.
|
||||
2. Start KeePassGO once so it can refresh the native host manifest for the discovered extension id.
|
||||
3. Configure the gRPC address and API token in the extension settings page.
|
||||
|
||||
## Current Browser Flow
|
||||
|
||||
- The extension checks sign-in pages in the background and caches per-tab match state instead of waiting for the popup to be opened first.
|
||||
- The toolbar badge shows when KeePassGO found matches for the current page.
|
||||
- Username and password fields get an inline KeePassGO affordance that opens a candidate chooser anchored to the focused field and keeps fills scoped to that field's form when possible.
|
||||
- If a fill request needs user approval, the extension keeps the pending state visible in both the page affordance and the popup until KeePassGO resolves it, using the token-scoped pending-approval count from the local gRPC API.
|
||||
|
||||
For extension-side regression checks, run:
|
||||
|
||||
```bash
|
||||
node --test browser/extension/background.test.cjs browser/extension/content.test.cjs
|
||||
```
|
||||
|
||||
For a reproducible real-browser Chromium validation harness, run:
|
||||
|
||||
```bash
|
||||
make browser-extension-validate
|
||||
```
|
||||
|
||||
That target:
|
||||
|
||||
- validates the Firefox flow by default with a temporary addon install
|
||||
- can also validate Chromium with `make browser-extension-validate BROWSER=chromium`
|
||||
- builds the native messaging bridge
|
||||
- starts a stub KeePassGO gRPC server and a local login page
|
||||
- drives the browser through inline match discovery, approval visibility, and fill completion
|
||||
|
||||
If validation fails, the script preserves its temporary workspace path so the captured HTML, screenshots, logs, and native-host files can be inspected.
|
||||
|
||||
## Required Token Scope
|
||||
|
||||
|
||||
Reference in New Issue
Block a user