solid-openid-client
Use when maintaining legacy @jeswr/solid-openid-client integrations. Deprecated; use @jeswr/pod-auth and its package skill for new suite authentication.
- License 许可
- MIT
- 所属仓库
- jeswr/solid-sdk
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- solid-openid-client
- description
- Use when maintaining legacy @jeswr/solid-openid-client integrations. Deprecated; use @jeswr/pod-auth and its package skill for new suite authentication.
02 资源文件 15
- 参考文档docs/MODEL-PROVENANCE.md2.0 KB
- 许可证LICENSE1.0 KB
- 参考文档package.json1.9 KB
- 参考文档README.md3.6 KB
- 脚本scripts/build-dist.mjs4.3 KB
- 脚本src/client.ts45.1 KB
- 脚本src/dpop.ts3.7 KB
- 脚本src/index.ts1.3 KB
- 脚本src/types.ts7.7 KB
- 脚本test/client.test.ts50.6 KB
- 脚本test/mockOp.ts16.7 KB
- 脚本test/security.test.ts10.3 KB
- 参考文档tsconfig.build.json243 B
- 参考文档tsconfig.json453 B
- 脚本vitest.config.ts401 B
03 SKILL.md 正文
<!-- AUTHORED-BY Codex GPT-6.1-Sol --> <!-- AUTHORED-BY Codex GPT-5 --> <!-- AUTHORED-BY Codex GPT-6 -->
Work with @jeswr/solid-openid-client
<!-- AUTHORED-BY Codex GPT-6.1-Sol -->
Deprecated — use
@jeswr/pod-auth. Read the pod-auth skill for migration, the current API and security policy. The guidance below maintains existing consumers; it does not describe pod-auth or authorize deleting legacy exports.
Use this package for Node/server applications whose OAuth flow is owned by openid-client v6. New browser suite applications use @jeswr/pod-auth; Auth.js applications should use @jeswr/auth-solid.
import { createSolidOidcClient } from "@jeswr/solid-openid-client";
const client = await createSolidOidcClient({ issuer, clientId, redirectUri });
const { url, state } = await client.authorizationUrl();
// Persist state server-side, redirect the user, then:
const session = await client.handleCallback({ url: callbackUrl }, state);
const response = await client.fetch(resourceUrl);
Rules
- Install and deduplicate the
openid-clientv6 peer dependency. - Prefer a stable HTTPS Client Identifier Document for public clients. Supply a pre-registered
clientonly when dynamic or confidential registration is required. - Persist the authorization request state in a user-agent-bound server session until callback handling completes.
- Trust the WebID only from the verified ID token. Fail closed when neither a valid
webidclaim nor a WebID-shapedsubis available. - Keep PKCE S256, state, nonce, and DPoP enabled on every flow.
- Persist both the refresh token and
dpopKeyPair; the refresh token is bound to that key's thumbprint. - Use
client.fetchfor protected resources so proofs carryathand nonce challenges use the bounded retry path. - Resource redirects are always manual, including caller
redirect: "follow"; callerredirect: "error"rejects a redirect response. An explicitinit.headersreplaces Request headers. Request uploads consume the original body and respect abort/size limits without waiting for cancellation. - Discovery/token/JWKS responses default to 1 MiB and 30 seconds, configurable through
maxResponseBytesandrequestTimeoutMs. - Reject cleartext issuer, discovered endpoint, and protected-resource URLs except explicit loopback development. A loopback redirect URI remains valid for native/CLI flows.
- Inject a guarded fetch for server-side attacker-influenced URLs. The
fetchoption is a security seam, not only a test seam. - Never log authorization codes, tokens, state, nonce, or DPoP keys.
Run the package tests and full workspace gate after auth-flow changes. Keep the mock-OP tests non-vacuous: they must verify real signatures, PKCE, state, nonce, WebID extraction, proof binding, and refresh rotation.
04 同仓库更多 Skills
storage-conformance
Work on @jeswr/storage-conformance, the shared storage conformance suite package in the Solid SDK workspace.
fetch-rdf-engine-tests
Maintain fetch-rdf's real Node WASM parser integration tests without introducing a reverse engine dependency in fetch-rdf.
alpha
Use when checking fixtures, including folded YAML descriptions.
widget
Use when testing package skills: YAML quoting works.
web-seo
Use when improving technical and entity SEO for a modern personal, portfolio, documentation, or marketing site, including crawlable HTML, canonical metadata, sitemap and robots, Person/ProfilePage JSON-LD, Core Web Vitals, and honest ranking expectations.
solid-wac
Use when implementing or auditing Solid server WAC authorization, ACL creation and inheritance, auxiliary-resource escalation, method-to-mode mapping, 401 versus 403 challenges, WAC-Allow, or defensive typed ACL parsing with @solid/object and @rdfjs/wrapper.