createAuthMutations(authClient) throws a TypeScript error when the auth client includes the convexClient() plugin (from kitcn/auth/client). The issue also occurs with the convexClient() from @convex-dev/better-auth/client/plugins.
Error
src/lib/auth-client.ts(25,25): error TS2345: Argument of type '...' is not assignable to parameter of type 'AuthClient'.
Types of property 'getSession' are incompatible.
Type '<FetchOptions extends ClientFetchOption<never, ...>>(...) => Promise<...>' is not assignable to type 'AnyFn'.
Types of parameters 'data_0' and 'args' are incompatible.
Type 'unknown' is not assignable to type 'Prettify<{ query?: ... }>'.
better-auth 1.6.x , i think the latest one which is 1.6.9
changed getSession's signature to use constrained generic parameters (see get-convex/better-auth#323 , Specifically, shouldReturnResponse now defaults to true when ctx.request instanceof Request, and getSession gained typed query/fetch options with disableCookieCache and disableRefresh params.
Environment
- better-auth: ^1.6.9
- @convex-dev/better-auth: ^0.12.0
- kitcn: ^0.13.9
anyone want workaround , u can just
createAuthMutations(authClient as any)
createAuthMutations(authClient) throws a TypeScript error when the auth client includes the convexClient() plugin (from kitcn/auth/client). The issue also occurs with the convexClient() from @convex-dev/better-auth/client/plugins.
Error
better-auth 1.6.x , i think the latest one which is 1.6.9
changed getSession's signature to use constrained generic parameters (see get-convex/better-auth#323 , Specifically, shouldReturnResponse now defaults to true when ctx.request instanceof Request, and getSession gained typed query/fetch options with disableCookieCache and disableRefresh params.
Environment
anyone want workaround , u can just
createAuthMutations(authClient as any)