diff --git a/docs/content/docs/integrations/tanstack.mdx b/docs/content/docs/integrations/tanstack.mdx index 113096771e..ae3fe9e346 100644 --- a/docs/content/docs/integrations/tanstack.mdx +++ b/docs/content/docs/integrations/tanstack.mdx @@ -12,8 +12,8 @@ Before you start, make sure you have a Better Auth instance configured. If you h We need to mount the handler to a TanStack API endpoint. Create a new file: `/app/routes/api/auth/$.ts` -```ts -import { auth } from '@/lib/auth' +```ts title="routes/api/auth/$.ts" +import { auth } from '@/lib/auth' // import your auth instance import { createAPIFileRoute } from '@tanstack/react-start/api' export const APIRoute = createAPIFileRoute('/api/auth/$')({ @@ -24,6 +24,4 @@ export const APIRoute = createAPIFileRoute('/api/auth/$')({ return auth.handler(request) }, }) -``` - -This will allow you to access use the `getSession` method in all of your routes. +``` \ No newline at end of file