Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

fix(marketplace): use Figma's current OAuth token and refresh endpoints

rubenluetke10-beep109d98ca4334
diff --git a/docs/marketplace/plugin-auth-audit.md b/docs/marketplace/plugin-auth-audit.md
index 245adef8f8..fec0958c7e 100644
--- a/docs/marketplace/plugin-auth-audit.md
+++ b/docs/marketplace/plugin-auth-audit.md
@@ -67,7 +67,7 @@ Twenty-six further hosted MCP services (Atlassian, Sentry, PayPal, Zapier and ot
| `salesforce` (Salesforce) | Connect entry observed; completion blocked | Not reached | Not verified | Not verified | Not run | Not completed | Windows UI only; other OSes not exercised | **BLOCKED** | Publisher OAuth client is missing; the real UI displays publisher setup pending. **Owner:** Project publisher. **Next:** Provision the official shared OAuth registration and any required review, then repeat the full clean browser journey. Observation: Connect Salesforce Browser sign-in is not available yet. Browser sign-in is pending publisher setup. No developer account or client registration is required from you. Use your own OAuth client (advanced) Cancel Continue |
| `granola` (Granola) | Connect entry observed; completion blocked | Provider page reached; authorization incomplete | Not verified | Not verified | Not run | Not completed | Windows UI only; other OSes not exercised | **BLOCKED** | Provider account sign-in has not been completed. **Owner:** Provider account holder. **Next:** Complete official sign-in and consent, then verify all seven stages with a real read-only plugin action. Observation: Official mcp-auth.granola.ai sign-in reached from real Connect; account sign-in required. |
| `zoom` (Zoom) | Connect entry observed; completion blocked | Not reached | Not verified | Not verified | Not run | Not completed | Windows UI only; other OSes not exercised | **BLOCKED** | Publisher OAuth client is missing; the real UI displays publisher setup pending. **Owner:** Project publisher. **Next:** Provision the official shared OAuth registration and any required review, then repeat the full clean browser journey. Observation: Connect Zoom Browser sign-in is not available yet. Browser sign-in is pending publisher setup. No developer account or client registration is required from you. Use your own OAuth client (advanced) Cancel Continue |
-| `figma` (Figma) | Connect entry observed; completion blocked | Not reached | Not verified | Not verified | Not run | Not completed | Windows UI only; other OSes not exercised | **BLOCKED** | Publisher OAuth client is missing; the real UI displays publisher setup pending. **Owner:** Project publisher. **Next:** Provision the official shared OAuth registration and any required review, then repeat the full clean browser journey. Observation: Connect Figma Browser sign-in is not available yet. Browser sign-in is pending publisher setup. No developer account or client registration is required from you. Use your own OAuth client (advanced) Expert token alternative Cancel Continue |
+| `figma` (Figma) | Connect entry observed; completion blocked | Not reached | Not verified | Not verified | Not run | Not completed | Windows UI only; other OSes not exercised | **BLOCKED** | Publisher OAuth client is not provisioned: the draft Figma OAuth app "Personal Jarvis" (observed 2026-10-07) has no redirect URL, no allowed scopes and no stored client secret. Figma's token endpoint requires the secret (HTTP Basic) and refreshes at `/v1/oauth/refresh`, which the catalog now uses. **Owner:** Project publisher. **Next:** Add redirect `http://127.0.0.1:3127/oauth/callback` and the four read scopes, regenerate the secret, add a figma token-broker route and ship the client id, submit the app for public review, then repeat the full clean browser journey. Observation: Connect Figma Browser sign-in is not available yet. Browser sign-in is pending publisher setup. No developer account or client registration is required from you. Use your own OAuth client (advanced) Expert token alternative Cancel Continue |
| `amd_gpu` (AMD GPU Status) | Connect entry observed; completion blocked | Not reached | Not verified | Not verified | Not run | Not completed | Supported Linux AMD host required | **BLOCKED** | Real UI reports unsupported OS: this connector needs a compatible Linux AMD host with AMD SMI. **Owner:** Hardware test operator. **Next:** Run the no-login connection and real telemetry read on a supported Linux AMD host, then verify lifecycle. Observation: Plugins Skills Plugins MCPs Plugins AMD GPU Status Unsupported on this device · Home & Devices Connect AMD GPU telemetry is unavailable on this operating system. This connector requires a compatible Linux AMD host with AMD SMI. Read AMD GPU utilization, temperature and driver data through AMD SMI... |
| `shopify` (Shopify) | Connect entry observed; card renders with logo, Connect fails honestly | Provider page not reached (wrong flow, now corrected) | Not verified | Not verified | Not run | Not completed | Windows UI only; other OSes not exercised | **BLOCKED** | The first configuration used Dynamic Client Registration, but Shopify publishes no DCR registration_endpoint, so Connect failed before any browser page opened ("provider request failed"). The entry now uses Authorization Code + PKCE loopback against the publisher-shared app (loopback http://127.0.0.1:3130/oauth/callback, RFC 8707 resource https://setup.shopify.com/mcp, comma-joined read scopes). The shared app is not provisioned yet, so the dialog reports browser sign-in pending; no store-owner sign-in has been completed either. **Owner:** Project publisher. **Next:** Register the official shared Shopify app (redirect URI above, read scopes for products, orders, customers and discounts), provision publisher_shopify_oauth_client_id/secret, then repeat the full clean browser journey with a real read-only plugin action. Until then an expert can connect with their own Shopify app client through the dialog's advanced option. Observation: Connect on the Shopify card returned the generic failure dialog on 2026-09-21; live metadata at setup.shopify.com serves OAuth discovery but no registration endpoint. |
diff --git a/docs/marketplace/plugin-e2e-audit.json b/docs/marketplace/plugin-e2e-audit.json
index f9b53afa07..271cd46e3f 100644
--- a/docs/marketplace/plugin-e2e-audit.json
+++ b/docs/marketplace/plugin-e2e-audit.json
@@ -2225,7 +2225,7 @@
{
"plugin_id": "figma",
"result": "BLOCKED",
- "config_fingerprint": "b644ba3d27855621fda403804c65157d0a46496e5eaa232d8f241ad6110a96cb",
+ "config_fingerprint": "30ec7b013f5808fa4e1bd2450da3bc16480d892e30ed80acd0138c0329c04c60",
"initial_state": "connect_attempt",
"evidence": {
"ui": {
@@ -2265,9 +2265,9 @@
}
},
"blocker": {
- "reason": "Publisher OAuth client is missing; the real UI displays publisher setup pending.",
+ "reason": "Publisher OAuth client is not provisioned. A draft Figma OAuth app \"Personal Jarvis\" exists (observed 2026-10-07) but has no redirect URL, no allowed scopes and no stored client secret; Figma's token endpoint requires the secret (HTTP Basic), so a shipped public client also needs a token broker.",
"owner": "Project publisher",
- "next_action": "Provision the official shared OAuth registration and any required review, then repeat the full clean browser journey.",
+ "next_action": "In the Figma developer console add the redirect URL http://127.0.0.1:3127/oauth/callback and the scopes current_user:read, projects:read, file_content:read, file_comments:read, regenerate the client secret, add a figma route to the token broker and ship the client id, submit the app for public review, then repeat the full clean browser journey with a real read-only action.",
"evidence": "Connect Figma\n\nBrowser sign-in is not available yet.\n\nBrowser sign-in is pending publisher setup. No developer account or client registration is required from you.\n\nUse your own OAuth client (advanced)\nExpert token alternative\nCancel\nContinue"
}
},
diff --git a/jarvis/marketplace/auth/oauth_pkce_loopback.py b/jarvis/marketplace/auth/oauth_pkce_loopback.py
index 980442117c..466dc70956 100644
--- a/jarvis/marketplace/auth/oauth_pkce_loopback.py
+++ b/jarvis/marketplace/auth/oauth_pkce_loopback.py
@@ -81,6 +81,9 @@ class PkceLoopbackConfig:
# has one, the browser redirect to its https callback) instead of
# ``token_url``, with no secret. ``None`` means the provider directly.
token_broker: str | None = None
+ # Provider endpoint for the refresh_token grant when it is not
+ # ``token_url`` (Figma). ``None`` refreshes at ``token_url``.
+ refresh_url: str | None = None
def token_auth_method(self, secret: str | None) -> str:
"""Honor X's endpoint contract, including legacy installed catalogs."""
@@ -463,7 +466,7 @@ class PkceLoopbackHandler:
client_secret = None
auth_method = "none"
else:
- token_url = self._config.token_url
+ token_url = self._config.refresh_url or self._config.token_url
auth_method = current.extra.get(
"token_endpoint_auth_method"
) or self._config.token_auth_method(client_secret)
diff --git a/jarvis/marketplace/catalog.py b/jarvis/marketplace/catalog.py
index 1267115661..9ef2353020 100644
--- a/jarvis/marketplace/catalog.py
+++ b/jarvis/marketplace/catalog.py
@@ -103,6 +103,8 @@ class OAuthPkceLoopbackAuth(_BaseAuth):
mode: Literal["oauth_pkce_loopback"]
authorization_url: str
token_url: str
+ # Figma refreshes at its own endpoint (/v1/oauth/refresh), not token_url.
+ refresh_url: str | None = None
revocation_url: str | None = None
client_id: str
client_secret: str | None = Field(default=None, exclude=True)
diff --git a/jarvis/marketplace/connect_helpers.py b/jarvis/marketplace/connect_helpers.py
index 0c15048f6f..6427b6c437 100644
--- a/jarvis/marketplace/connect_helpers.py
+++ b/jarvis/marketplace/connect_helpers.py
@@ -138,6 +138,7 @@ def build_pkce_config(plugin_id: str, auth: OAuthPkceLoopbackAuth) -> PkceLoopba
plugin_id=plugin_id,
authorization_url=auth.authorization_url,
token_url=auth.token_url,
+ refresh_url=auth.refresh_url,
client_id=client_id,
client_secret=client_secret,
callback_port=auth.callback_port or 0,
diff --git a/jarvis/marketplace/plugins/figma/plugin.json b/jarvis/marketplace/plugins/figma/plugin.json
index c640c88393..82a6fd67e1 100644
--- a/jarvis/marketplace/plugins/figma/plugin.json
+++ b/jarvis/marketplace/plugins/figma/plugin.json
@@ -16,7 +16,9 @@
"auth": {
"mode": "oauth_pkce_loopback",
"authorization_url": "https://www.figma.com/oauth",
- "token_url": "https://www.figma.com/api/oauth/token",
+ "token_url": "https://api.figma.com/v1/oauth/token",
+ "refresh_url": "https://api.figma.com/v1/oauth/refresh",
+ "client_auth_method": "client_secret_basic",
"client_id": "REPLACE_WITH_JARVIS_FIGMA_CLIENT_ID",
"callback_port": 3127,
"callback_path": "/oauth/callback",
diff --git a/jarvis/marketplace/seed_catalog.json b/jarvis/marketplace/seed_catalog.json
index 8632f720f5..b477b90f2c 100644
--- a/jarvis/marketplace/seed_catalog.json
+++ b/jarvis/marketplace/seed_catalog.json
@@ -1482,7 +1482,9 @@
"auth": {
"mode": "oauth_pkce_loopback",
"authorization_url": "https://www.figma.com/oauth",
- "token_url": "https://www.figma.com/api/oauth/token",
+ "token_url": "https://api.figma.com/v1/oauth/token",
+ "refresh_url": "https://api.figma.com/v1/oauth/refresh",
+ "client_auth_method": "client_secret_basic",
"client_id": "REPLACE_WITH_JARVIS_FIGMA_CLIENT_ID",
"callback_port": 3127,
"callback_path": "/oauth/callback",
diff --git a/tests/unit/marketplace/test_pkce_resource.py b/tests/unit/marketplace/test_pkce_resource.py
index daaf7ac202..57f6b048be 100644
--- a/tests/unit/marketplace/test_pkce_resource.py
+++ b/tests/unit/marketplace/test_pkce_resource.py
@@ -327,3 +327,59 @@ async def test_refresh_bound_public_client_ignores_later_configured_secret(
assert captured["data"]["client_id"] == "issuing-public-client"
assert "client_secret" not in captured["data"]
+
+
+async def test_figma_exchanges_at_token_url_and_refreshes_at_refresh_url(
+ monkeypatch: pytest.MonkeyPatch,
+):
+ """Figma takes the code at /v1/oauth/token and the refresh grant at
+ /v1/oauth/refresh, both with the client in an HTTP Basic header."""
+ from jarvis.marketplace.catalog import OAuthPkceLoopbackAuth
+
+ manifest_path = (
+ Path(__file__).resolve().parents[3] / "jarvis/marketplace/plugins/figma/plugin.json"
+ )
+ manifest = json.loads(manifest_path.read_text(encoding="utf-8"))
+ auth = OAuthPkceLoopbackAuth.model_validate(
+ manifest["extensions"]["io.github.personaljarvis"]["auth"]
+ )
+ calls: list[dict] = []
+
+ async def _fake_post(self, url, *args, **kwargs): # noqa: ANN001, ANN002, ANN003
+ calls.append({"url": url, "data": kwargs["data"], "headers": kwargs["headers"]})
+ return httpx.Response(
+ 200, json={"access_token": "access", "refresh_token": "refresh", "expires_in": 3600}
+ )
+
+ monkeypatch.setattr(httpx.AsyncClient, "post", _fake_post)
+ cfg = PkceLoopbackConfig(
+ plugin_id="figma",
+ authorization_url=auth.authorization_url,
+ token_url=auth.token_url,
+ refresh_url=auth.refresh_url,
+ client_id="cid",
+ client_secret=TEST_CLIENT_SECRET,
+ callback_port=auth.callback_port,
+ scopes=auth.scopes,
+ scope_separator=auth.scope_separator,
+ client_auth_method=auth.client_auth_method,
+ )
+ handler = PkceLoopbackHandler(cfg)
+ pending = _PendingPkceFlow(
+ config=cfg,
+ callback_server=None,
+ code_verifier="verifier",
+ redirect_uri="http://127.0.0.1:3127/oauth/callback",
+ )
+
+ tokens = await handler._exchange(pending, code="code") # noqa: SLF001
+ await handler.refresh(tokens)
+
+ exchange, refresh = calls
+ assert exchange["url"] == "https://api.figma.com/v1/oauth/token"
+ assert refresh["url"] == "https://api.figma.com/v1/oauth/refresh"
+ for call in calls:
+ assert call["headers"]["Authorization"].startswith("Basic ")
+ assert "client_secret" not in call["data"]
+ assert refresh["data"]["refresh_token"] == "refresh"