Skip to content

docs: rewrite README to reflect current state - #14

Merged
rabble merged 1 commit into
mainfrom
docs/readme-refresh
Jul 10, 2026
Merged

rabble merged 1 commit into
mainfrom
docs/readme-refresh

Conversation

@rabble

@rabble rabble commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

Rewrites README.md to accurately reflect the current @divinevideo/login API and behavior, verified against src/ and tests/.

Verified changes

  • Corrected getAuthorizationUrl() return — documents { url, pkce } (previously implied { url }), and explains when the verifier must be passed to exchangeCode.
  • Corrected Quick Start flow — uses parseCallback() and handles the createRpc() null case (no access_token), matching the real factory return.
  • Documented the onUnauthorized auto-refresh hook on DivineRpc, wired to getSessionWithRefresh(), with a real usage snippet.
  • Documented resilience behavior now in the code: 429 retry with exponential backoff + Retry-After, 30s request timeouts, and cross-tab refresh serialization via the Web Locks API.
  • Completed the API reference — added refreshSession, getAuthorizationHandle, isExpired, toStoredCredentials, DivineRpc.fromServerUrl, RpcError, and the exported generatePkce/validatePkce utilities and public types.
  • Added a Browser (CDN) section — DivineLogin global from unpkg/jsDelivr and the @divinevideo/login/browser export.
  • Added a Development section — build/dev/lint/test scripts from package.json; CI runs lint, test, and build on Node 22.
  • Clarified configuration — policy:full default scope, divine_* storage keys, optional nostr-tools peer dependency for BYOK, and TokenResponse fields.

Kept the existing brand-aligned framing, the keycast-login migration section, and the standard Divine footer.

Test plan

Docs-only change. Verified every documented symbol, signature, default, and endpoint against src/index.ts, src/oauth.ts, src/rpc.ts, src/types.ts, src/pkce.ts, package.json, and .github/workflows/ci.yml.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@rabble
rabble merged commit a132935 into main Jul 10, 2026
3 checks passed
@rabble
rabble deleted the docs/readme-refresh branch July 10, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant