|
1 | 1 | # solid-oidc |
2 | 2 |
|
3 | 3 | [](https://www.npmjs.com/package/solid-oidc) |
4 | | -[](LICENSE) |
| 4 | +[](LICENSE) |
5 | 5 | [](#) |
| 6 | +[](#) |
6 | 7 |
|
7 | | -**Minimal, zero-build Solid-OIDC client for browsers.** |
| 8 | +**Minimal, zero-build, zero-dependency Solid-OIDC client for browsers.** |
8 | 9 |
|
9 | | -A single JavaScript file (~600 lines) that handles the complete Solid-OIDC authentication flow. No bundler, no transpiler, no build step required. |
| 10 | +A single JavaScript file (~700 lines, 4kb gzipped) that handles the complete Solid-OIDC authentication flow. No bundler, no transpiler, no build step, no npm dependencies. Uses the Web Crypto API natively. |
10 | 11 |
|
11 | 12 | [**Live Demo**](https://javascriptsolidserver.github.io/solid-oidc/example.html) · [**API Reference**](#api-reference) · [**Examples**](#advanced-usage) |
12 | 13 |
|
13 | 14 | --- |
14 | 15 |
|
15 | 16 | ## Why solid-oidc? |
16 | 17 |
|
17 | | -| Feature | solid-oidc | Other libraries | |
18 | | -|---------|------------|-----------------| |
19 | | -| **Size** | ~600 lines | 1,000–5,000 lines | |
20 | | -| **Build step** | None | Required | |
21 | | -| **Copy-paste ready** | Yes | No | |
22 | | -| **Readable source** | Yes | Compiled/minified | |
| 18 | +| Feature | solid-oidc | @inrupt/solid-client-authn-browser | @inrupt/oidc-client | |
| 19 | +|---------|------------|-----------------------------------|---------------------| |
| 20 | +| **Unpacked size** | 34kb | 1,697kb | 18,704kb | |
| 21 | +| **Gzipped** | 4kb | ~170kb | ~2MB | |
| 22 | +| **Files in package** | 1 | 92 | 100+ | |
| 23 | +| **Lines of code** | ~700 | thousands | thousands | |
| 24 | +| **Dependencies** | 0 | 5 (+transitive) | 5 (+transitive) | |
| 25 | +| **Build step** | None | Rollup | Required | |
| 26 | +| **Copy-paste ready** | Yes | No | No | |
| 27 | +| **Readable source** | Yes | Compiled/minified | Compiled | |
| 28 | +| **Browser native crypto** | Yes (Web Crypto) | No (jose, uuid, events) | No (crypto-js, core-js) | |
| 29 | +| **License** | AGPL-3.0 | MIT | MIT | |
23 | 30 |
|
24 | 31 | ## Features |
25 | 32 |
|
| 33 | +- **Zero dependencies** — Pure Web Crypto API, nothing to install |
26 | 34 | - **Zero build step** — Import from CDN or copy the file |
27 | 35 | - **Single file** — One `solid-oidc.js`, nothing else |
28 | | -- **~600 lines** — Readable, auditable, hackable |
| 36 | +- **~700 lines, 4kb gzipped** — Readable, auditable, hackable |
29 | 37 | - **Full Solid-OIDC** — Login, logout, token refresh, authenticated fetch |
30 | 38 | - **DPoP bound tokens** — Secure proof-of-possession (RFC 9449) |
31 | 39 | - **Persistent sessions** — Survives page refresh via IndexedDB |
@@ -282,6 +290,7 @@ This library implements: |
282 | 290 | | [RFC 6749](https://tools.ietf.org/html/rfc6749) | OAuth 2.0 | |
283 | 291 | | [RFC 7636](https://tools.ietf.org/html/rfc7636) | PKCE | |
284 | 292 | | [RFC 9207](https://tools.ietf.org/html/rfc9207) | Authorization Server Issuer Identification | |
| 293 | +| [RFC 7638](https://tools.ietf.org/html/rfc7638) | JWK Thumbprint | |
285 | 294 | | [RFC 9449](https://tools.ietf.org/html/rfc9449) | DPoP (Demonstration of Proof-of-Possession) | |
286 | 295 | | [Solid-OIDC](https://solidproject.org/TR/oidc) | Solid OIDC Specification | |
287 | 296 |
|
@@ -321,4 +330,4 @@ Based on [solid-oidc-client-browser](https://github.com/uvdsl/solid-oidc-client- |
321 | 330 |
|
322 | 331 | ## License |
323 | 332 |
|
324 | | -[MIT](LICENSE) |
| 333 | +[AGPL-3.0-or-later](LICENSE) |
0 commit comments