Expo plugin isn't a valid plugin

Just set up an external backend for my app and for some reason the expo plugin from import { expo } from "@better-auth/expo"; isnt compatible with the type BetterAuthPlugin.

Error:
Type '{ id: "expo"; init: (ctx: AuthContext) => { options: { trustedOrigins: string[]; }; }; onRequest(request: Request, ctx: AuthContext): Promise<{ request: Request; } | undefined>; hooks: { ...; }; }' is not assignable to type 'BetterAuthPlugin'.
  Types of property 'init' are incompatible.
    Type '(ctx: AuthContext) => { options: { trustedOrigins: string[]; }; }' is not assignable to type '(ctx: AuthContext) => void | { context?: { trustedOrigins?: (string | undefined)[] | undefined; appName?: string | undefined; baseURL?: string | undefined; newSession?: { ...; } | ... 1 more ... | undefined; ... 15 more ...; runMigrations?: (() => Promise<...>) | undefined; } | undefined; options?: Partial<...> | un...'.
      Types of parameters 'ctx' and 'ctx' are incompatible.
        Type 'import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.qzSbzJNO", { with: { "resolution-mode": "import" } }).l' is not assignable to type 'import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.B3qlboSE").l'.
          The types of 'options.socialProviders' are incompatible between these types.
            Type 'import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.DNTAFSt1", { with: { "resolution-mode": "import" } }).S | undefined' is not assignable to type 'import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.DTiSPWEk").S | undefined'.
              Type 'import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.DNTAFSt1", { with: { "resolution-mode": "import" } }).S' is not assignable to type 'import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.DTiSPWEk").S'.
                Types of property 'vk' are incompatible.
                  Type 'import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.CYegVoq1", { with: { "resolution-mode": "import" } }).P<import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.DNTAFSt1", { with: { "resolution-mode": "import" } }).a4 & { ...' is not assignable to type 'import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.CYegVoq1").P<import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.DTiSPWEk").a4 & { ...'.
                    Type 'import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.CYegVoq1", { with: { "resolution-mode": "import" } }).P<import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.DNTAFSt1", { with: { "resolution-mode": "import" } }).a4 & { ...' is not assignable to type 'import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.CYegVoq1").P<import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.DTiSPWEk").a4 & { ...'.
                      Types of property 'lang_id' are incompatible.
                        Type 'import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.DNTAFSt1", { with: { "resolution-mode": "import" } }).a3 | undefined' is not assignable to type 'import("<project-root>/node_modules/.pnpm/better-auth@1.2.7/node_modules/better-auth/dist/shared/better-auth.DTiSPWEk").a3 | undefined'.
                          Type 'LANG.RUS' is not assignable to type 'LANG | undefined'.
Was this page helpful?