From f5a57a136e3a28a74321ff71635df83d7efdbf0f Mon Sep 17 00:00:00 2001 From: Ezra Ashenafi Date: Tue, 13 May 2025 23:27:21 +0300 Subject: [PATCH] docs: update nuxt catch-all route to match example --- docs/content/docs/integrations/nuxt.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/content/docs/integrations/nuxt.mdx b/docs/content/docs/integrations/nuxt.mdx index 9bc3679b..9cebcfae 100644 --- a/docs/content/docs/integrations/nuxt.mdx +++ b/docs/content/docs/integrations/nuxt.mdx @@ -7,9 +7,9 @@ Before you start, make sure you have a Better Auth instance configured. If you h ### Create API Route -We need to mount the handler to an API route. Create a file inside `/server/api` called `[...auth].ts` and add the following code: +We need to mount the handler to an API route. Create a file inside `/server/api/auth` called `[...all].ts` and add the following code: -```ts title="server/api/[...auth].ts" +```ts title="server/api/auth/[...all].ts" import { auth } from "~/lib/auth"; // import your auth config export default defineEventHandler((event) => { @@ -17,7 +17,7 @@ export default defineEventHandler((event) => { }); ``` - You can change the path on your better-auth configuration but it's recommended to keep it as `/api/[...auth]` + You can change the path on your better-auth configuration but it's recommended to keep it as `/api/auth/[...all]` ### Migrate the database