Property 'teams' does not exist on type 'Prettify<{ id: string; name: string; createdAt: Date; ...

I updated the better-auth libary now my types does not work, teams seams like not exist in my types, which should work. Property 'teams' does not exist on type 'Prettify<{ id: string; name: string; createdAt: Date; slug: string; metadata?: any; logo?: string | null | undefined; } & { members: ({ id: string; createdAt: Date; userId: string; organizationId: string; role: string; teamId?: string | undefined; } & { ...; })[]; invitations: { ...; }[]; }>'.ts(2339) auth-client.js
import { stripeClient } from "@better-auth/stripe/client"
import { organizationClient } from "better-auth/client/plugins"
import { createAuthClient } from "better-auth/react"

import { organizationClientExtended } from "./better-auth-plugin/organization/organization-client"

const authClient = createAuthClient({
baseURL: process.env.BETTER_AUTH_URL,
plugins: [
organizationClient({
teams: {
enabled: true,
}
}),
organizationClientExtended(),
stripeClient({
subscription: true
})
],
})

// Export the full client for backward compatibility
export { authClient }

export const useSession = authClient.useSession
import { stripeClient } from "@better-auth/stripe/client"
import { organizationClient } from "better-auth/client/plugins"
import { createAuthClient } from "better-auth/react"

import { organizationClientExtended } from "./better-auth-plugin/organization/organization-client"

const authClient = createAuthClient({
baseURL: process.env.BETTER_AUTH_URL,
plugins: [
organizationClient({
teams: {
enabled: true,
}
}),
organizationClientExtended(),
stripeClient({
subscription: true
})
],
})

// Export the full client for backward compatibility
export { authClient }

export const useSession = authClient.useSession
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?