René's URL Explorer Experiment


Title: Resolve did:nostr globally via Nostr relays (decentralized step in resolver chain) · Issue #414 · JavaScriptSolidServer/JavaScriptSolidServer · GitHub

Open Graph Title: Resolve did:nostr globally via Nostr relays (decentralized step in resolver chain) · Issue #414 · JavaScriptSolidServer/JavaScriptSolidServer

X Title: Resolve did:nostr globally via Nostr relays (decentralized step in resolver chain) · Issue #414 · JavaScriptSolidServer/JavaScriptSolidServer

Description: Refs #42 (did:nostr resolution spec), #4 (NIP-98 SSO), #386 (LWS 1.0 alignment). Builds on #408 (HTTP .well-known endpoint) and #411 (subdomain-mode local index). Where we are today src/auth/nostr.js's verifyNostrAuth resolves a Nostr pu...

Open Graph Description: Refs #42 (did:nostr resolution spec), #4 (NIP-98 SSO), #386 (LWS 1.0 alignment). Builds on #408 (HTTP .well-known endpoint) and #411 (subdomain-mode local index). Where we are today src/auth/nostr....

X Description: Refs #42 (did:nostr resolution spec), #4 (NIP-98 SSO), #386 (LWS 1.0 alignment). Builds on #408 (HTTP .well-known endpoint) and #411 (subdomain-mode local index). Where we are today src/auth/nostr....

Opengraph URL: https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/414

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Resolve did:nostr globally via Nostr relays (decentralized step in resolver chain)","articleBody":"Refs #42 (did:nostr resolution spec), #4 (NIP-98 SSO), #386 (LWS 1.0 alignment). Builds on #408 (HTTP `.well-known` endpoint) and #411 (subdomain-mode local index).\n\n## Where we are today\n\n`src/auth/nostr.js`'s `verifyNostrAuth` resolves a Nostr pubkey to a WebID via a 4-step chain:\n\n1. **CID v1 verificationMethod** lookup against the resource owner's WebID profile (resource-side, #399)\n2. **Local in-process index** of `\u003cDATA_ROOT>/.idp/accounts/_webid_index.json` (#407 / #411 — same-pod users)\n3. **External HTTP `.well-known/did/nostr`** resolver (configured URL, e.g. `nostr.social`) — cross-pod, but trusts the indexer\n4. **Fallback** to `did:nostr:\u003cpubkey>` as the agent identity\n\nStep 3 is the only \"cross-pod\" path today, and it relies on a **single configured HTTP indexer**. That's a centralization point: every JSS deployment delegates global resolution to whoever runs that indexer.\n\n## The proposal\n\nInsert a **direct Nostr relay** resolution step between today's #2 (local index) and #3 (HTTP indexer):\n\n> **2.5 Relay-based resolution.** Connect to a configured set of Nostr relays, query for the user's DID-metadata replaceable event (kind defined by the [did:nostr spec](https://nostrcg.github.io/did-nostr/)), verify the event signature, parse `content` as the DID document, and extract `alsoKnownAs[0]` as the candidate WebID. Then run the same backlink check the other steps use (does the WebID profile declare this pubkey via CID-VM?).\n\nThis is what makes did:nostr **genuinely decentralized**. The pubkey-to-DID-doc binding is verifiable from the Schnorr signature on the relay event alone — no trusted indexer in the loop. The user controls publication via their own relays.\n\n## Why this matters\n\nWithout this step:\n- Every JSS deployment depends on `nostr.social` (or whoever is configured) staying online + honest\n- A user changing pods mid-session has to wait for the indexer to re-scrape\n- The `alsoKnownAs` claim could be silently rewritten by a compromised/malicious indexer\n\nWith it:\n- JSS reads the user's DID doc straight from relays the user chose\n- Indexers (`nostr.social`, `nostr.rocks`) become *one* path among many — useful as an HTTP cache layer, not the source of truth\n- A user who runs their own relay can be fully self-sovereign — no third party in the auth path\n\n## Implementation sketch\n\n- **Relay client**: NDK or `@nostr/client` already in the dependency tree from elsewhere — pick whichever is lightest. Subscribe pattern, not long-lived.\n- **Default relay set**: configurable via `JSS_NOSTR_RELAYS` env (comma-separated). Default to a small set of public relays (`relay.damus.io`, `nos.lol`).\n- **Per-user relay hint**: optional NIP-05 lookup on the WebID's domain to find user-preferred relays before falling back to defaults.\n- **DID-metadata event kind**: per the did:nostr spec (likely a replaceable kind in the `30000–39999` range — confirm against current spec draft).\n- **Replaceable-event race**: pick the event with the highest `created_at` across responding relays.\n- **Caching**: same TTL semantics as the current `did-nostr.js` cache (5m success, 1m transient failure), keyed on `pubkey + relay-set-fingerprint`.\n- **Verification**: signature check + signed-by-target-pubkey check + DID-doc shape validation + `alsoKnownAs` backlink check (reuses existing `checkCidVmBacklink` from #408).\n\nInsert into `verifyNostrAuth`'s chain in `src/auth/nostr.js`:\n\n```\n1. tryResolveViaCidVerificationMethod\n2. resolveDidNostrLocally          (gated on idpEnabled)\n2.5 resolveDidNostrViaRelays       (NEW)\n3. resolveDidNostrToWebId          (HTTP indexer fallback)\n4. did:nostr fallback\n```\n\n## Test plan\n\n- [ ] Unit tests for `resolveDidNostrViaRelays` with a mocked relay client (success, no event, signature mismatch, replaceable-event ordering)\n- [ ] Integration test against `relay.damus.io` (or a local relay) with a published test DID-metadata event\n- [ ] Confirm the chain order: a known-local user still resolves via step 2 without ever hitting the relays\n- [ ] Confirm the HTTP indexer step still fires for users without published DID-metadata events on the configured relay set\n\n## Related deferred work\n\n- Real-time updates on the local index when the LDP write path mutates a profile (mentioned in #408 description) — relay-based resolution makes the local index less load-bearing for cross-pod identities, but the same hook would benefit both\n- Per-pod NIP-05 `didResolver` discovery (mentioned in #408) — overlaps with the \"user-preferred relays\" hint above\n\n## Refs\n\n- [did:nostr spec — Resolution](https://nostrcg.github.io/did-nostr/) — defines both HTTP `.well-known` and relay-based paths\n- Existing chain: `src/auth/nostr.js` (verifyNostrAuth)\n- Existing HTTP resolver: `src/auth/did-nostr.js` (resolveDidNostrToWebId, with SSRF + redirect hardening from #408)","author":{"url":"https://github.com/melvincarvalho","@type":"Person","name":"melvincarvalho"},"datePublished":"2026-05-10T08:39:47Z","url":"https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/414"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:58e83337-5dd1-4bef-335e-e0e0fc609c76
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDA8A:19854D:57B673:737C4A:6B03898B
html-safe-nonce7eb245525596cf0ee8074d44bead6c0a684e8a5920e5140244eb7a2afd6f64e8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQThBOjE5ODU0RDo1N0I2NzM6NzM3QzRBOjZCMDM4OThCIiwidmlzaXRvcl9pZCI6IjE3ODkwOTU1NzQ1NDc2ODUyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac449011f3af8094df5df36793f195f17877bb9b0eaa93e9bb62ef8ca0ecf24a15
hovercard-subject-tagissue:4415135639
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/JavaScriptSolidServer/JavaScriptSolidServer/414/issue_layout
twitter:imagehttps://opengraph.githubassets.com/789c97579155db9f13631496d43eb5cb1abe8987daa81473ccd60e8c5b221ac2/JavaScriptSolidServer/JavaScriptSolidServer/issues/414
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/789c97579155db9f13631496d43eb5cb1abe8987daa81473ccd60e8c5b221ac2/JavaScriptSolidServer/JavaScriptSolidServer/issues/414
og:image:altRefs #42 (did:nostr resolution spec), #4 (NIP-98 SSO), #386 (LWS 1.0 alignment). Builds on #408 (HTTP .well-known endpoint) and #411 (subdomain-mode local index). Where we are today src/auth/nostr....
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemelvincarvalho
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/JavaScriptSolidServer/JavaScriptSolidServer git https://github.com/JavaScriptSolidServer/JavaScriptSolidServer.git
octolytics-dimension-user_id205442424
octolytics-dimension-user_loginJavaScriptSolidServer
octolytics-dimension-repository_id958025407
octolytics-dimension-repository_nwoJavaScriptSolidServer/JavaScriptSolidServer
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id958025407
octolytics-dimension-repository_network_root_nwoJavaScriptSolidServer/JavaScriptSolidServer
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/414#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJavaScriptSolidServer%2FJavaScriptSolidServer%2Fissues%2F414
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJavaScriptSolidServer%2FJavaScriptSolidServer%2Fissues%2F414
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=JavaScriptSolidServer%2FJavaScriptSolidServer
Reloadhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/414
Reloadhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/414
Reloadhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/414
JavaScriptSolidServerhttps://github.com/JavaScriptSolidServer
JavaScriptSolidServerhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer
Codehttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer
Issues165 (165)https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues
Pull requests14 (14)https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pulls
Actionshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/actions
Projectshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/projects
Security and qualityhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/security
Insightshttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/insights
https://github.com/JavaScriptSolidServer/JavaScriptSolidServer
New issuehttps://github.com/login?return_to=https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/414
New issuehttps://github.com/login?return_to=https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/414
Resolve did:nostr globally via Nostr relays (decentralized step in resolver chain)https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/414#top
nostrNostr relay, did:nostr auth, NIP-relatedhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues?q=state%3Aopen%20label%3A%22nostr%22
https://github.com/melvincarvalho
melvincarvalhohttps://github.com/melvincarvalho
on May 10, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/414#issue-4415135639
#42https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/42
#4https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/4
#386https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/386
#408https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/408
#411https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/411
auth: NIP-98 verifier upgrades did:nostr → WebID via verificationMethod lookup (#4 Phase 2A via CID) #399https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/399
auth: serve /.well-known/did/nostr/.json so the pod is its own DID resolver #407https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/407
well-known did:nostr index doesn't find subdomain-mode pods #411https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/411
#2https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/2
#3https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/3
did:nostr spechttps://nostrcg.github.io/did-nostr/
auth: serve /.well-known/did/nostr/.json (#407) #408https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/408
auth: serve /.well-known/did/nostr/.json (#407) #408https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/408
auth: serve /.well-known/did/nostr/.json (#407) #408https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/408
did:nostr spec — Resolutionhttps://nostrcg.github.io/did-nostr/
auth: serve /.well-known/did/nostr/.json (#407) #408https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/408
melvincarvalhohttps://github.com/melvincarvalho
nostrNostr relay, did:nostr auth, NIP-relatedhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues?q=state%3Aopen%20label%3A%22nostr%22
on May 10, 2026https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/414#event-25350939158
Sign up for freehttps://github.com/signup?return_to=https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/414
Sign in to commenthttps://github.com/login?return_to=https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/414
nostrNostr relay, did:nostr auth, NIP-relatedhttps://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues?q=state%3Aopen%20label%3A%22nostr%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.