[GH-ISSUE #1701] Type 'Polar' is missing the following properties from type 'Polar': advertisements, #private #8874

Closed
opened 2026-04-13 04:07:06 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @davidabou on GitHub (Mar 5, 2025).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/1701

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. Create new nuxt project
  2. Install better-auth.
  3. Configure better-auth with polar plugin

Current vs. Expected behavior

I have this error when I pass client to polar plugin function :

Type 'Polar' is missing the following properties from type 'Polar': advertisements, #privatets(2739)
index.d.ts(43, 5): The expected type comes from property 'client' which is declared here on type 'PolarOptions'

I should not have this error.

What version of Better Auth are you using?

1.2.3

Provide environment information

- OS: Windows 11
- Browser: Firefox

Which area(s) are affected? (Select all that apply)

Backend

Auth config (if applicable)

import { betterAuth } from 'better-auth'
import { prismaAdapter } from 'better-auth/adapters/prisma'
import { PrismaClient } from '@prisma/client'
import { Polar } from '@polar-sh/sdk'
import { polar } from '@polar-sh/better-auth'

const client = new Polar({
  accessToken: process.env.POLAR_ACCESS_TOKEN,
  server: 'production'
})
export const auth = betterAuth({
  baseURL: process.env.BETTER_AUTH_URL!,
  database: prismaAdapter(prisma, { provider: 'postgresql' }),
  emailAndPassword: { enabled: true },
  socialProviders: {
    github: {
      clientId: process.env.GITHUB_CLIENT_ID!,
      clientSecret: process.env.GITHUB_CLIENT_SECRET!
    }
  },
  user: {
    deleteUser: { enabled: true }
  },
  account: {
    accountLinking: { enabled: true, allowDifferentEmails: true }
  },
  plugins: [
    polar({
      client,
      ^^^^^^
      createCustomerOnSignUp: true,
      enableCustomerPortal: true,
      checkout: {
        enabled: true,
        ...
      }
    })
  ]
})

Additional context

No response

Originally created by @davidabou on GitHub (Mar 5, 2025). Original GitHub issue: https://github.com/better-auth/better-auth/issues/1701 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. Create new nuxt project 2. Install better-auth. 3. Configure better-auth with `polar` plugin ### Current vs. Expected behavior I have this error when I pass client to polar plugin function : ``` Type 'Polar' is missing the following properties from type 'Polar': advertisements, #privatets(2739) index.d.ts(43, 5): The expected type comes from property 'client' which is declared here on type 'PolarOptions' ``` I should not have this error. ### What version of Better Auth are you using? 1.2.3 ### Provide environment information ```bash - OS: Windows 11 - Browser: Firefox ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript import { betterAuth } from 'better-auth' import { prismaAdapter } from 'better-auth/adapters/prisma' import { PrismaClient } from '@prisma/client' import { Polar } from '@polar-sh/sdk' import { polar } from '@polar-sh/better-auth' const client = new Polar({ accessToken: process.env.POLAR_ACCESS_TOKEN, server: 'production' }) export const auth = betterAuth({ baseURL: process.env.BETTER_AUTH_URL!, database: prismaAdapter(prisma, { provider: 'postgresql' }), emailAndPassword: { enabled: true }, socialProviders: { github: { clientId: process.env.GITHUB_CLIENT_ID!, clientSecret: process.env.GITHUB_CLIENT_SECRET! } }, user: { deleteUser: { enabled: true } }, account: { accountLinking: { enabled: true, allowDifferentEmails: true } }, plugins: [ polar({ client, ^^^^^^ createCustomerOnSignUp: true, enableCustomerPortal: true, checkout: { enabled: true, ... } }) ] }) ``` ### Additional context _No response_
GiteaMirror added the lockedbug labels 2026-04-13 04:07:06 -05:00
Author
Owner

@Bekacru commented on GitHub (Mar 5, 2025):

Please open this issue on Polar's repo instead. the Polar plugin isn't maintained by Better Auth team.

<!-- gh-comment-id:2702163777 --> @Bekacru commented on GitHub (Mar 5, 2025): Please open this issue on [Polar's repo](https://github.com/polarsource/polar-adapters) instead. the Polar plugin isn't maintained by Better Auth team.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#8874