Title: Cross-origin SSO→pod handoff (phased plan): ?webid= now, NIP-98 fragment later · Issue #8 · JavaScriptSolidServer/sso · GitHub
Open Graph Title: Cross-origin SSO→pod handoff (phased plan): ?webid= now, NIP-98 fragment later · Issue #8 · JavaScriptSolidServer/sso
X Title: Cross-origin SSO→pod handoff (phased plan): ?webid= now, NIP-98 fragment later · Issue #8 · JavaScriptSolidServer/sso
Description: Tracking issue for the phased rollout of "SSO redirects the user to their pod AND the pod knows who just arrived." Replaces the prior 0.0.2 OIDC approach (which couldn't bridge cross-origin into the pod's own auth widget) with a much sma...
Open Graph Description: Tracking issue for the phased rollout of "SSO redirects the user to their pod AND the pod knows who just arrived." Replaces the prior 0.0.2 OIDC approach (which couldn't bridge cross-origin into th...
X Description: Tracking issue for the phased rollout of "SSO redirects the user to their pod AND the pod knows who just arrived." Replaces the prior 0.0.2 OIDC approach (which couldn't bridge cross-...
Opengraph URL: https://github.com/JavaScriptSolidServer/sso/issues/8
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cross-origin SSO→pod handoff (phased plan): ?webid= now, NIP-98 fragment later","articleBody":"Tracking issue for the phased rollout of \"SSO redirects the user to their pod AND the pod knows who just arrived.\" Replaces the prior 0.0.2 OIDC approach (which couldn't bridge cross-origin into the pod's own auth widget) with a much smaller protocol: the SSO appends an identifier to the redirect URL, and xlogin on the pod reads it.\n\nSister to #6 (authenticated session) — that issue is about the authentication semantics; this one is about the **mechanism** by which credentials cross the origin boundary.\n\n## Phases\n\nEach phase is one observable step. We confirm phase N works before starting phase N+1.\n\n### Phase 1 — SSO appends `?webid=` ✅\n\nSSO redirects to:\n```\nhttps://\u003cpod>/?webid=did:nostr:\u003c64-hex-pubkey>\n```\n\n- ✅ [sso@cb0c996](https://github.com/JavaScriptSolidServer/sso/commit/cb0c996) — `login.js` builds the redirect via `URL.searchParams.set('webid', ...)`. Merges with `?next=` cleanly.\n- ✅ Verified live: `jss.live/sso/` → `test.solid.social/?webid=did:nostr:de7ecf…ebfe`.\n\n### Phase 2a — xlogin reads `?webid=` and displays it 🟡\n\nWhen the pod's xlogin widget loads on a URL with `?webid=`, render a small caption above the Login button: `Sign in as: \u003cvalue>`. Purely informational, no behavior change.\n\n- 🟡 [melvincarvalho/xlogin#16](https://github.com/melvincarvalho/xlogin/pull/16) — open\n- Confirms the query-param handoff is visible end-to-end before we wire any logic to it.\n\n### Phase 2b — xlogin auto-triggers Use Browser Extension\n\nWhen `?webid=` is present and the value is `did:nostr:\u003cpk>`, xlogin auto-runs the Nostr browser-extension login (`window.nostr.getPublicKey` + signed challenge against the pod's WebID lookup). User sees: one signer-extension popup (or auto-approved if pre-trusted), then they're authenticated. No \"Login\" click needed.\n\nOpen question: behavior when the signer returns a different pubkey than the `?webid=` hint (extension switched accounts since SSO). Probably ignore the hint and proceed with what the signer actually returns.\n\n### Phase 2c — xlogin scrubs `?webid=` after consumption\n\n`history.replaceState(null, '', location.pathname)` once the hint has been read. Keeps the URL clean for refresh/bookmark/share.\n\n### Phase 3 — replace `?webid=` with NIP-98 signed event in URL fragment\n\nThe query-param form is unsigned — a hostile redirect could put any pubkey in there. Phase 3 upgrades the protocol:\n\n- SSO has the signer sign a NIP-98 event (kind 27235) bound to the pod URL\n- Redirect uses URL fragment: `https://\u003cpod>/#nip98=\u003cbase64url-event>`\n- xlogin verifies the Schnorr signature, the `u` tag, and `created_at` window\n- Pod's local `.well-known/did/nostr/\u003cpubkey>.json` resolves pubkey → WebID\n- Session established as that WebID\n\nFragment-only (not query) so the credential never appears in server logs or Referer. See earlier discussion in #1 for the design walkthrough.\n\n## Out of scope here\n\n- Replay protection (skipped for PoC — phase 3 will revisit if needed)\n- Multi-identity handling (covered separately by #7)\n- Cross-IdP resolution (handled by 0.0.3 / 0.0.4 / JSS#414)\n\n## Why phases over one big change\n\nThe SSO's job (resolve + redirect) works today (#1). The pod's auth (xlogin's Login button) works today. The phased plan keeps both working while the cross-origin bridge is built one observable step at a time. Each phase is independently rollable.\n\n## Refs\n\n- sso#1 — 0.0.1 PoC (shipped)\n- sso#6 — authenticated-session milestone\n- sso#7 — multi-user\n- [melvincarvalho/xlogin#16](https://github.com/melvincarvalho/xlogin/pull/16) — phase 2a PR","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-12T06:46:57Z","url":"https://github.com/JavaScriptSolidServer/sso/issues/8"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:013dd176-49e9-3d97-9e2c-63c121bc10fa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9DBC:17DCE6:2AE2949:38C0400:6B039780 |
| html-safe-nonce | e72d073dbba0f9c7004dcd7729ac8c42691c9da3b4fd0928b3413bddf3fdaee9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REJDOjE3RENFNjoyQUUyOTQ5OjM4QzA0MDA6NkIwMzk3ODAiLCJ2aXNpdG9yX2lkIjoiNDU5OTg0NjUxNzY2OTU5OTEwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 03957e4803683813789dc62777772a00e5661a4258f6aed92af6411ae08a0664 |
| hovercard-subject-tag | issue:4426845592 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/sso/8/issue_layout |
| twitter:image | https://opengraph.githubassets.com/248bb8ee58cfc94b49614280dcaa16c65290932af29e668458d03e87c04a5c01/JavaScriptSolidServer/sso/issues/8 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/248bb8ee58cfc94b49614280dcaa16c65290932af29e668458d03e87c04a5c01/JavaScriptSolidServer/sso/issues/8 |
| og:image:alt | Tracking issue for the phased rollout of "SSO redirects the user to their pod AND the pod knows who just arrived." Replaces the prior 0.0.2 OIDC approach (which couldn't bridge cross-origin into th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | melvincarvalho |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/JavaScriptSolidServer/sso git https://github.com/JavaScriptSolidServer/sso.git |
| octolytics-dimension-user_id | 205442424 |
| octolytics-dimension-user_login | JavaScriptSolidServer |
| octolytics-dimension-repository_id | 1236281583 |
| octolytics-dimension-repository_nwo | JavaScriptSolidServer/sso |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1236281583 |
| octolytics-dimension-repository_network_root_nwo | JavaScriptSolidServer/sso |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width