From bc3cdc751aab0868eaa7886e2a6037196db30036 Mon Sep 17 00:00:00 2001 From: Lukas Scholten <46937006+luksch42@users.noreply.github.com> Date: Wed, 27 Nov 2024 13:35:19 +0100 Subject: [PATCH] docs: add customSessionClient import (#673) --- docs/content/docs/concepts/session-management.mdx | 1 + .../src/plugins/custom-session/custom-session.test.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/content/docs/concepts/session-management.mdx b/docs/content/docs/concepts/session-management.mdx index 7d615d32d0..ea07696748 100644 --- a/docs/content/docs/concepts/session-management.mdx +++ b/docs/content/docs/concepts/session-management.mdx @@ -179,6 +179,7 @@ This will add `roles` and `user.newField` to the session response. **Infer on the Client** ```ts title="client.ts" +import { customSessionClient } from "better-auth/client/plugins"; import type { auth } from "@/lib/auth"; // Import the auth instance as a type const authClient = createAuthClient({ diff --git a/packages/better-auth/src/plugins/custom-session/custom-session.test.ts b/packages/better-auth/src/plugins/custom-session/custom-session.test.ts index f40470ac66..cb84109ebc 100644 --- a/packages/better-auth/src/plugins/custom-session/custom-session.test.ts +++ b/packages/better-auth/src/plugins/custom-session/custom-session.test.ts @@ -4,7 +4,7 @@ import { customSession } from "."; import { admin } from "../admin"; import { createAuthClient } from "../../client"; import { customSessionClient } from "./client"; -import type { BetterAuthOptions, InferUser } from "../../types"; +import type { BetterAuthOptions } from "../../types"; import { adminClient } from "../admin/client"; describe("Custom Session Plugin Tests", async () => {