[sso] eom.dev accounts: Dex OIDC login (PKCE) and wallet linking #15

Merged
claude merged 4 commits from night/sso/accounts into night/2026-11-16 2026-11-17 04:12:51 +00:00
4 Commits
Author SHA1 Message Date
claudeandClaude Opus 5.5 1435eeb107 account: client builds the link message; mobile top bar; review fixes
- shared/account-link.ts: linkMessage + clientLinkMessage. The wallet only
  signs a message the client builds locally (validated nonce/expiry) and
  refuses when the node's text differs, so a hostile node or network
  attacker cannot get a transfer or trade signed (night-review must-fix 1).
- Narrow screens (<480px): the account button floats outside the top bar,
  icon only with aria-label (must-fix 2: 360px overflow).
- Leaderboard names prefer preferred_username over the LDAP real name;
  consent text sits on the Link button.
- At most 5 pending link challenges per account (429).
- nodeBase(): WIKIDECK_NODE_URL for Capacitor builds.
- Tests: hostile transfer message is never signed, per-account cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:04:49 -05:00
claudeandClaude Opus 5.5 2a062cf5e1 account: README with flow, endpoints and deploy notes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:00:34 -05:00
claudeandClaude Opus 5.5 fed0832d4a account: only allow redirect URIs registered on Dex
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:59:42 -05:00
claudeandClaude Opus 5.5 86fe6bffd3 eom.dev accounts: Dex OIDC login (PKCE) and wallet linking
- server/account: JWKS-verified Dex ID tokens (RS256, exact issuer,
  audience/azp, exp/iat/nbf with skew, nonce), node-side code exchange as
  the public client "wikideck" (Dex sends no CORS headers), and an
  off-chain SQLite account <-> wallet store. Wallet ownership is proved by
  signing a single-use, domain-tagged off-chain challenge with the
  existing P-256 wallet key; consensus verifySignature is reused read-only.
- Routes under /api/account: config, token, me, challenge, link,
  DELETE link/:address, names (leaderboard display names, never email).
- src/auth: PKCE S256 client, sessionStorage-only tokens, LoginButton with
  initials avatar, wallet link, Capacitor system-browser + custom-scheme
  redirect support (completeLogin for appUrlOpen).
- Hooks: one import + one app.use in server/testnet/http.ts (no CSP
  change), one import + one element in src/App.tsx.
- tests/account-oidc and tests/account-link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:55:51 -05:00