diff --git a/docs/pages/getting-started/astro.md b/docs/pages/getting-started/astro.md index 5a05e9d67..7af15b57e 100644 --- a/docs/pages/getting-started/astro.md +++ b/docs/pages/getting-started/astro.md @@ -58,7 +58,7 @@ declare module "lucia" { We recommend setting up a middleware to validate requests. The validated user will be available as `local.user`. You can just copy-paste the code into `src/middleware.ts`. -It's a bit verbose, but it just reads the session cookie, validates it, and sets a new cookie if necessary. Since Astro doesn't implement CSRF protection out of the box, it must be implemented. If you're curious about what's happening here, see the [Validating requests](/basics/validate-session-cookies/astro) page. +It's a bit verbose, but it just reads the session cookie, validates it, and sets a new cookie if necessary. Since Astro doesn't implement CSRF protection out of the box, it must be implemented. If you're curious about what's happening here, see the [Validating requests](/guides/validate-session-cookies/astro) page. ```ts // src/middleware.ts diff --git a/docs/pages/getting-started/nuxt.md b/docs/pages/getting-started/nuxt.md index c2c00c531..091957fca 100644 --- a/docs/pages/getting-started/nuxt.md +++ b/docs/pages/getting-started/nuxt.md @@ -61,7 +61,7 @@ node --experimental-web-crypto index.js We recommend setting up a middleware to validate requests. The validated user will be available as `event.context.user`. You can just copy-paste the code into `server/middleware/auth.ts`. -It's a bit verbose, but it just reads the session cookie, validates it, and sets a new cookie if necessary. Since Nuxt doesn't implement CSRF protection out of the box, it must be implemented. If you're curious about what's happening here, see the [Validating requests](/basics/validate-session-cookies/nuxt) page. +It's a bit verbose, but it just reads the session cookie, validates it, and sets a new cookie if necessary. Since Nuxt doesn't implement CSRF protection out of the box, it must be implemented. If you're curious about what's happening here, see the [Validating requests](/guides/validate-session-cookies/nuxt) page. ```ts // server/middleware/auth.ts diff --git a/docs/pages/getting-started/solidstart.md b/docs/pages/getting-started/solidstart.md index c46846037..9ba59d33c 100644 --- a/docs/pages/getting-started/solidstart.md +++ b/docs/pages/getting-started/solidstart.md @@ -42,7 +42,7 @@ declare module "lucia" { We recommend setting up a middleware to validate requests. The validated user will be available as `context.user`. You can just copy-paste the code into `src/middleware.ts`. -It's a bit verbose, but it just reads the session cookie, validates it, and sets a new cookie if necessary. Since SolidStart doesn't implement CSRF protection out of the box, it must be implemented when working with cookies. If you're curious about what's happening here, see the [Validating requests](/basics/validate-session-cookies/solidstart) page. +It's a bit verbose, but it just reads the session cookie, validates it, and sets a new cookie if necessary. Since SolidStart doesn't implement CSRF protection out of the box, it must be implemented when working with cookies. If you're curious about what's happening here, see the [Validating requests](/guides/validate-session-cookies/solidstart) page. ```ts // src/middleware.ts diff --git a/docs/pages/getting-started/sveltekit.md b/docs/pages/getting-started/sveltekit.md index 8fef2540f..7d9f5b3b8 100644 --- a/docs/pages/getting-started/sveltekit.md +++ b/docs/pages/getting-started/sveltekit.md @@ -43,7 +43,7 @@ declare module "lucia" { We recommend setting up a handle hook to validate requests. The validated user will be available as `local.user`. -If you're curious about what's happening here, see the [Validating requests](/basics/validate-session-cookies/sveltekit) page. +If you're curious about what's happening here, see the [Validating requests](/guides/validate-session-cookies/sveltekit) page. ```ts // src/hooks.server.ts diff --git a/docs/pages/tutorials/github-oauth/nextjs-app.md b/docs/pages/tutorials/github-oauth/nextjs-app.md index 7cecf4b8c..4d0c34abf 100644 --- a/docs/pages/tutorials/github-oauth/nextjs-app.md +++ b/docs/pages/tutorials/github-oauth/nextjs-app.md @@ -204,7 +204,7 @@ interface GitHubUser { ## Validate requests -Create `validateRequest()`. This will check for the session cookie, validate it, and set a new cookie if necessary. Make sure to catch errors when setting cookies and wrap the function with `cache()` to prevent unnecessary database calls. To learn more, see the [Validating requests](/basics/validate-session-cookies/nextjs-app) page. +Create `validateRequest()`. This will check for the session cookie, validate it, and set a new cookie if necessary. Make sure to catch errors when setting cookies and wrap the function with `cache()` to prevent unnecessary database calls. To learn more, see the [Validating requests](/guides/validate-session-cookies/nextjs-app) page. CSRF protection should be implemented but Next.js handles it when using form actions (but not for API routes). diff --git a/docs/pages/tutorials/github-oauth/nextjs-pages.md b/docs/pages/tutorials/github-oauth/nextjs-pages.md index 550dcce79..a75c4bd20 100644 --- a/docs/pages/tutorials/github-oauth/nextjs-pages.md +++ b/docs/pages/tutorials/github-oauth/nextjs-pages.md @@ -203,7 +203,7 @@ interface GitHubUser { ## Validate requests -Create `validateRequest()`. This will check for the session cookie, validate it, and set a new cookie if necessary. To learn more, see the [Validating requests](/basics/validate-session-cookies/nextjs-pages) page. +Create `validateRequest()`. This will check for the session cookie, validate it, and set a new cookie if necessary. To learn more, see the [Validating requests](/guides/validate-session-cookies/nextjs-pages) page. CSRF protection should be implemented and you should already have a middleware for it. diff --git a/docs/pages/tutorials/username-and-password/nextjs-app.md b/docs/pages/tutorials/username-and-password/nextjs-app.md index bb75dcdfb..5fa63ddb0 100644 --- a/docs/pages/tutorials/username-and-password/nextjs-app.md +++ b/docs/pages/tutorials/username-and-password/nextjs-app.md @@ -242,7 +242,7 @@ async function login(_: any, formData: FormData): Promise { ## Validate requests -Create `validateRequest()`. This will check for the session cookie, validate it, and set a new cookie if necessary. Make sure to catch errors when setting cookies and wrap the function with `cache()` to prevent unnecessary database calls. To learn more, see the [Validating requests](/basics/validate-session-cookies/nextjs-app) page. +Create `validateRequest()`. This will check for the session cookie, validate it, and set a new cookie if necessary. Make sure to catch errors when setting cookies and wrap the function with `cache()` to prevent unnecessary database calls. To learn more, see the [Validating requests](/guides/validate-session-cookies/nextjs-app) page. CSRF protection should be implemented but Next.js handles it when using form actions (but not for API routes). diff --git a/docs/pages/tutorials/username-and-password/nextjs-pages.md b/docs/pages/tutorials/username-and-password/nextjs-pages.md index c3831adca..e9c8ec24c 100644 --- a/docs/pages/tutorials/username-and-password/nextjs-pages.md +++ b/docs/pages/tutorials/username-and-password/nextjs-pages.md @@ -273,7 +273,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) ## Validate requests -Create `validateRequest()`. This will check for the session cookie, validate it, and set a new cookie if necessary. To learn more, see the [Validating requests](/basics/validate-session-cookies/nextjs-pages) page. +Create `validateRequest()`. This will check for the session cookie, validate it, and set a new cookie if necessary. To learn more, see the [Validating requests](/guides/validate-session-cookies/nextjs-pages) page. CSRF protection should be implemented and you should already have a middleware for it. diff --git a/docs/pages/upgrade-v3/index.md b/docs/pages/upgrade-v3/index.md index 716e0ffee..dcb8d3621 100644 --- a/docs/pages/upgrade-v3/index.md +++ b/docs/pages/upgrade-v3/index.md @@ -209,5 +209,3 @@ const nextConfig = { } }; ``` - - diff --git a/package.json b/package.json index 302f9b797..386a44242 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "publish-setup": "pnpm i --no-frozen-lockfile && cd packages/lucia && pnpm build && cd ../adapter-test && pnpm build && cd ../../", "format": "pnpm exec prettier --write . --plugin=prettier-plugin-astro", - "format:docs": "pnpm exec prettier --write documentation --plugin=prettier-plugin-astro", + "format:docs": "pnpm exec prettier --write docs --plugin=prettier-plugin-astro", "preinstall": "npx only-allow pnpm", "auri.format": "pnpm format", "auri.publish_setup": "pnpm publish-setup"