|
| 1 | +# JSS SSO |
| 2 | + |
| 3 | +Universal one-click sign-in for Solid pods. One screen, one button. |
| 4 | +You click, the universe figures out who you are, you land at your pod. |
| 5 | + |
| 6 | +## What it is |
| 7 | + |
| 8 | +A static HTML page (no build step, no server) that wraps the standard |
| 9 | +Solid-OIDC flow with the smallest possible UI surface — a single button. |
| 10 | +The button kicks off OIDC against a configurable IdP, the IdP handles |
| 11 | +the actual identity proof (Schnorr via [Podkey](https://github.com/JavaScriptSolidServer/podkey) |
| 12 | +/ [xlogin](https://github.com/JavaScriptSolidServer/xlogin), passkey, |
| 13 | +or password), and the user lands at their pod root. |
| 14 | + |
| 15 | +No username box. No IdP picker. No "what app are you logging in from?" |
| 16 | +question. Click → resolve → arrive. |
| 17 | + |
| 18 | +## What it does |
| 19 | + |
| 20 | +``` |
| 21 | +┌────────────────────────────────────────┐ |
| 22 | +│ sso.solid.social (or any host) │ |
| 23 | +│ ┌──────────────────────┐ │ |
| 24 | +│ │ Sign in to Solid │ ← only UI │ |
| 25 | +│ └──────────────────────┘ │ |
| 26 | +└────────────────┬───────────────────────┘ |
| 27 | + │ Solid-OIDC redirect to configured IdP |
| 28 | + ▼ |
| 29 | +┌────────────────────────────────────────┐ |
| 30 | +│ JSS resolver chain (already shipped) │ |
| 31 | +│ 1. CID v1 verificationMethod (#399) │ |
| 32 | +│ 2. Local index (.idp/accounts) │ |
| 33 | +│ 3. .well-known/did/nostr (#408, #411)│ |
| 34 | +│ 4. External HTTP did:nostr resolver │ |
| 35 | +│ 5. did:nostr identity (fallback) │ |
| 36 | +└────────────────┬───────────────────────┘ |
| 37 | + │ resolved WebID |
| 38 | + ▼ |
| 39 | +┌────────────────────────────────────────┐ |
| 40 | +│ Redirect to pod root │ |
| 41 | +└────────────────────────────────────────┘ |
| 42 | +``` |
| 43 | + |
| 44 | +Same-pod users hit the local index — zero typing required. Cross-pod |
| 45 | +users hit the configured HTTP resolver until #414 (relay-based resolution) |
| 46 | +lands, after which the resolution becomes fully decentralized. |
| 47 | + |
| 48 | +## Run it locally |
| 49 | + |
| 50 | +No build step. Pure static files. Any static server works: |
| 51 | + |
| 52 | +```bash |
| 53 | +npx serve . # any port |
| 54 | +python3 -m http.server 8080 |
| 55 | +``` |
| 56 | + |
| 57 | +Or open `index.html` directly (CDN imports resolve over the network). |
| 58 | + |
| 59 | +## Configuration |
| 60 | + |
| 61 | +URL params (also persisted to `localStorage` so post-redirect navigation |
| 62 | +finds them): |
| 63 | + |
| 64 | +| Param | Default | Purpose | |
| 65 | +|-------|---------|---------| |
| 66 | +| `idp` | `https://solid.social` | OIDC issuer to authenticate against | |
| 67 | +| `next` | pod root derived from WebID | Where to land after sign-in | |
| 68 | + |
| 69 | +Example: a Solid app wants users to authenticate and come back — |
| 70 | + |
| 71 | +``` |
| 72 | +https://sso.solid.social/?idp=https://solid.social&next=https://myapp.example/ |
| 73 | +``` |
| 74 | + |
| 75 | +## Hosting |
| 76 | + |
| 77 | +Three sensible deployment targets: |
| 78 | + |
| 79 | +1. **GitHub Pages** on this repo (`gh-pages` branch is the default). |
| 80 | +2. **A Solid pod** — eats own dog food. Drop `index.html` + `login.js` |
| 81 | + at `<pod>/sso/` and the SSO page itself becomes a Solid resource. |
| 82 | +3. **`jss.live/sso/`** — pairs with the other JSS no-build apps |
| 83 | + ([JSS Git](https://jss.live/git/)). |
| 84 | + |
| 85 | +## Status |
| 86 | + |
| 87 | +**v0.1 — proof of concept**. Demonstrates the one-button UX end-to-end |
| 88 | +against `solid.social` as the IdP. Same-pod resolution works zero-typing |
| 89 | +(JSS shipped the underlying resolver chain in |
| 90 | +[#408](https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/408) |
| 91 | +through |
| 92 | +[#418](https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/pull/418)). |
| 93 | + |
| 94 | +## Roadmap |
| 95 | + |
| 96 | +- **v0.1** — Single-button OIDC against a configurable IdP. ✅ (this commit) |
| 97 | +- **v0.2** — Auto-discover IdP from a Nostr extension's pubkey (NIP-05 or |
| 98 | + did:nostr DID-doc). |
| 99 | +- **v0.3** — Direct Nostr-relay resolution (sits on top of |
| 100 | + [JSS #414](https://github.com/JavaScriptSolidServer/JavaScriptSolidServer/issues/414)). |
| 101 | + Removes the configured-IdP dependency for cross-pod identities. |
| 102 | +- **v0.4** — Passkey-only fallback. Sign in without ever installing a |
| 103 | + Nostr extension. |
| 104 | + |
| 105 | +## Why a separate repo? |
| 106 | + |
| 107 | +- The SSO page is a **product**, not a feature of the server. It lives |
| 108 | + on top of JSS but isn't part of JSS's runtime. |
| 109 | +- It's a **client** — pure browser code, no Node dependencies, no test |
| 110 | + suite, no deploy pipeline. Different release cadence than the server. |
| 111 | +- It can be **hosted by anyone**, including by a Solid pod itself. |
| 112 | +- It's the visible artifact of the resolver-chain work — the part of |
| 113 | + the stack people interact with directly. |
| 114 | + |
| 115 | +## License |
| 116 | + |
| 117 | +MIT. See [LICENSE](./LICENSE). |
0 commit comments