mirror of
https://github.com/github/awesome-copilot.git
synced 2026-08-13 20:59:12 +00:00
Improve connector reload authentication UX (#2370)
Keep Azure tokens in memory and preserve linked namespace context across extension reloads. Co-authored-by: Alex Yang (DevDiv) <yangalex@microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -20,18 +20,13 @@ MCP server issue locally.
|
||||
## Prerequisites
|
||||
|
||||
1. **A browser for Microsoft Entra sign-in.** The harness opens the same
|
||||
interactive Azure sign-in as the extension when its encrypted Azure Identity
|
||||
session is not already available.
|
||||
interactive Azure sign-in as the extension at the start of each process.
|
||||
2. **A gateway already picked once.** The harness reads gateway coordinates from
|
||||
`~/.copilot/extensions/connector-namespaces/artifacts/gateway-config.json`
|
||||
(`{ subscriptionId, resourceGroup, gatewayName }`). Pick a gateway once in
|
||||
the connector-namespaces canvas, or write that file by hand.
|
||||
3. **An operating-system secure credential store.** Windows and macOS provide one
|
||||
by default. Linux and WSL require a Secret Service-compatible keyring, such as
|
||||
GNOME Keyring, with `libsecret` available. Unencrypted token storage is
|
||||
intentionally disabled.
|
||||
4. **Node 20+** (developed on Node 24).
|
||||
5. **Extension dependencies installed.** From the repository root, run:
|
||||
3. **Node 20+** (developed on Node 24).
|
||||
4. **Extension dependencies installed.** From the repository root, run:
|
||||
|
||||
```bash
|
||||
npm install --prefix extensions/connector-namespaces
|
||||
@@ -65,9 +60,9 @@ node extensions/connector-namespaces/test/smoke.mjs --limit=5 --open-consent
|
||||
## One-time connector consent
|
||||
|
||||
OAuth-backed servers (most of them) need a human to consent **once** in a
|
||||
browser. Azure ARM sign-in is restored from the operating system's encrypted
|
||||
credential store described in the prerequisites; the one-time behavior below
|
||||
applies to the connector's own consent. The model:
|
||||
browser. Azure ARM sign-in is process-memory only and is repeated for each
|
||||
harness process; the one-time behavior below applies to the connector's own
|
||||
consent. The model:
|
||||
|
||||
1. **First run** hits a server that needs consent → the harness prints a consent
|
||||
URL and marks it `NEEDS_CONSENT`. It saves a pending record to
|
||||
|
||||
Reference in New Issue
Block a user