Files
CatoandClaude 25a3471087 fix(client): Lightning's client plugin no longer breaks createAuthClient (#78)
0.26.0's lightningClient() named better-auth's own fetch type, which went into
the published declaration. In BiasLens, whose better-auth resolved another
@better-fetch/fetch, authClientPlugins() was no longer assignable to
createAuthClient's plugins and the typecheck failed. The plugin types its one
call by shape; a test keeps better-fetch names out of the declaration and a
type test compiles a product's own wiring.


Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-03 00:08:31 +01:00

9 lines
462 B
TypeScript

// Compiles only if a product can hand AccountKit's client plugins to
// better-auth's own createAuthClient, and the client to the shared screens.
import { createAuthClient } from "better-auth/react";
import { authClientPlugins } from "../../src/auth/client.js";
import type { AuthClientLike } from "../../src/auth/react.js";
export const authClient = createAuthClient({ plugins: authClientPlugins() });
export const screensClient: AuthClientLike = authClient;