expoClient type error in monorepo when used outside of expo app
I have a turborepo with package folder named
auth
which has better-auth setup to import into my expo and next.js apps.



1 Reply
If I use expoClient in my
auth
package (outside of the expo app) as outlined in the docs I get a type error.
It seems like the expoClient has a type signature incompatibility with BetterAuthClientPlugin:
* expoClient.getActions expects 2 parameters: ($fetch, $store)
* BetterAuthClientPlugin expects 3 parameters: ($fetch, $store, options)
If I setup the auth-client in the expo app exactly like the docs there is no type error.
https://www.better-auth.com/docs/integrations/expo
actually my workaround also results in getCookie()
being removed from the authClient type.
Property 'getCookie' does not exist on type '{ signIn: { social: <FetchOptions extends { method?: string | undefined; headers?: (HeadersInit & (HeadersInit | CommonHeaders)) | undefined; cache?: RequestCache | undefined; ... 31 more ...; disableValidation?: boolean | undefined; }>(data_0: Prettify<...>, data_1?: FetchOptions | undefined) => Promise<...>; }; } ...'.