From 06da0b22ef2f9fd6ddce0843e799c419c756104f Mon Sep 17 00:00:00 2001 From: Rin Arakaki Date: Tue, 22 Apr 2025 18:39:31 +0900 Subject: [PATCH] docs: unify how authClient is imported (#2308) --- docs/content/docs/plugins/organization.mdx | 46 +++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/content/docs/plugins/organization.mdx b/docs/content/docs/plugins/organization.mdx index 08b86bc85e..540fd4fc58 100644 --- a/docs/content/docs/plugins/organization.mdx +++ b/docs/content/docs/plugins/organization.mdx @@ -49,7 +49,7 @@ export const auth = betterAuth({ import { createAuthClient } from "better-auth/client" import { organizationClient } from "better-auth/client/plugins" - const client = createAuthClient({ + const authClient = createAuthClient({ plugins: [ // [!code highlight] organizationClient() // [!code highlight] ] // [!code highlight] @@ -175,10 +175,10 @@ To list the organizations that a user is a member of, you can use `useListOrgani ```tsx title="client.tsx" -import { client } from "@/auth/client" +import { authClient } from "@/lib/auth-client" function App(){ - const { data: organizations } = client.useListOrganizations() + const { data: organizations } = authClient.useListOrganizations() return (
{organizations.map(org =>

{org.name}

)} @@ -191,8 +191,8 @@ function App(){ ```svelte title="page.svelte"

Organizations

s @@ -216,7 +216,7 @@ function App(){

Active Organization

@@ -352,7 +352,7 @@ To retrieve the active organization for the user, you can call the `useActiveOrg