Skip to content

Fix KitCN Better Auth client types#293

Merged
zbeyens merged 1 commit into
mainfrom
codex/fix-kitcn-better-auth-types
Jun 15, 2026
Merged

Fix KitCN Better Auth client types#293
zbeyens merged 1 commit into
mainfrom
codex/fix-kitcn-better-auth-types

Conversation

@zbeyens

@zbeyens zbeyens commented Jun 15, 2026

Copy link
Copy Markdown
Member
  • Auto release

🐛 Fixes KitCN Better Auth 1.6.18 client type compatibility for organization-heavy auth clients and generated auth app pins.

🟢 95-100% confidence

Phase 🧪 Tests 🌐 Browser
Type boundary bun test packages/kitcn/src/auth-client/convex-auth-provider.types.test.ts, bun test ./packages/kitcn/src/solid/convex-auth-provider.types.vitest.ts N/A
Package + fixtures bun tooling/dependency-pins.ts sync, bun --cwd packages/kitcn build, bun check Runtime scenarios in bun check loaded generated apps
OOM stress /tmp/kitcn-ba-oom-C3qmoU npm run typecheck, /tmp/kitcn-ba-oom-C3qmoU npm run typecheck:512 N/A

✅ Outcome

  • Stops KitCN's catch-all AuthClient type from letting arbitrary Better Auth plugin server endpoints erase getSession, which collapsed useSession().data to never.
  • Bumps supported Better Auth generated auth installs to 1.6.18, including Expo auth and example package alignment.

⚠️ Caveat

  • This does not prove Better Auth can never OOM in every possible app. It proves the latest KitCN heavy auth repro no longer type-fails and does not OOM under a 512 MB TypeScript heap.

🧭 Design

  • Keeps user-created createAuthClient(...) inference intact.
  • Makes KitCN's broad exported plugin buckets opaque for server endpoint inference instead of pretending Better Auth can safely infer every arbitrary plugin.

🔬 Verified

  • bun tooling/dependency-pins.ts sync
  • bun test packages/kitcn/src/auth-client/convex-auth-provider.types.test.ts
  • bun test ./packages/kitcn/src/solid/convex-auth-provider.types.vitest.ts
  • bun --cwd packages/kitcn build
  • /tmp/kitcn-ba-oom-C3qmoU: npm run typecheck
  • /tmp/kitcn-ba-oom-C3qmoU: npm run typecheck:512 (250 imports, 247145K memory)
  • bun lint:fix
  • bun check
  • .agents/skills/autoreview/scripts/autoreview --mode local

@changeset-bot

changeset-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 338bf2f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
kitcn Patch
@kitcn/resend Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
better-convex Ready Ready Preview, Comment Jun 15, 2026 8:38pm

Request Review

@zbeyens zbeyens merged commit 0fcbae0 into main Jun 15, 2026
5 checks passed
@zbeyens zbeyens deleted the codex/fix-kitcn-better-auth-types branch June 15, 2026 20:53
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