diff --git a/docs/pages/getting-started/astro.md b/docs/pages/getting-started/astro.md index 012ef6d42..b7bc4727d 100644 --- a/docs/pages/getting-started/astro.md +++ b/docs/pages/getting-started/astro.md @@ -99,6 +99,6 @@ declare namespace App { ## Next steps -You can learn all the concepts and APIs by reading the [Basics section](/basics/sessions) in the docs. If you prefer writing code immediately, check out the [Tutorials](/tutorials) page or the [examples repository](https://github.com/lucia-auth/examples/tree/v3). +You can learn all the concepts and APIs by reading the [Basics section](/basics/sessions) in the docs. If you prefer writing code immediately, check out the [Tutorials](/tutorials) page or the [examples repository](https://github.com/lucia-auth/examples/tree/main). If you have any questions, [join our Discord server](https://discord.com/invite/PwrK3kpVR3)! diff --git a/docs/pages/getting-started/express.md b/docs/pages/getting-started/express.md index 7477b701c..512d8f283 100644 --- a/docs/pages/getting-started/express.md +++ b/docs/pages/getting-started/express.md @@ -40,7 +40,7 @@ declare module "lucia" { ## Polyfill -If you're using Node.js 18 or below, you'll need to polyfill the Web Crypto API. This is not required in Node.js 20, CouldFlare Workers, Deno, Bun, and Vercel Edge Functions. This can be done either by importing `webcrypto`, or by enabling an experimental flag. +If you're using Node.js 18 or below, you'll need to polyfill the Web Crypto API. This is not required in Node.js 20, CloudFlare Workers, Deno, Bun, and Vercel Edge Functions. This can be done either by importing `webcrypto`, or by enabling an experimental flag. ```ts import { webcrypto } from "node:crypto"; @@ -54,6 +54,6 @@ node --experimental-web-crypto index.js ## Next steps -You can learn all the concepts and APIs by reading the [Basics section](/basics/sessions) in the docs. If you prefer writing code immediately, check out the [Tutorials](/tutorials) page or the [examples repository](https://github.com/lucia-auth/examples/tree/v3). +You can learn all the concepts and APIs by reading the [Basics section](/basics/sessions) in the docs. If you prefer writing code immediately, check out the [Tutorials](/tutorials) page or the [examples repository](https://github.com/lucia-auth/examples/tree/main). If you have any questions, [join our Discord server](https://discord.com/invite/PwrK3kpVR3)! diff --git a/docs/pages/getting-started/index.md b/docs/pages/getting-started/index.md index 4155e9654..cc67a4c69 100644 --- a/docs/pages/getting-started/index.md +++ b/docs/pages/getting-started/index.md @@ -50,7 +50,7 @@ declare module "lucia" { ## Polyfill -If you're using Node.js 18 or below, you'll need to polyfill the Web Crypto API. This is not required in Node.js 20, CouldFlare Workers, Deno, Bun, and Vercel Edge Functions. This can be done either by importing `webcrypto`, or by enabling an experimental flag. +If you're using Node.js 18 or below, you'll need to polyfill the Web Crypto API. This is not required in Node.js 20, CloudFlare Workers, Deno, Bun, and Vercel Edge Functions. This can be done either by importing `webcrypto`, or by enabling an experimental flag. ```ts import { webcrypto } from "node:crypto"; diff --git a/docs/pages/getting-started/nextjs-app.md b/docs/pages/getting-started/nextjs-app.md index 5d80f87d8..2afe0fc82 100644 --- a/docs/pages/getting-started/nextjs-app.md +++ b/docs/pages/getting-started/nextjs-app.md @@ -44,7 +44,7 @@ declare module "lucia" { ## Polyfill -If you're using Node.js 18 or below, you'll need to polyfill the Web Crypto API. This is not required in Node.js 20, CouldFlare Workers, Deno, Bun, and Vercel Edge Functions. This can be done either by importing `webcrypto`, or by enabling an experimental flag. +If you're using Node.js 18 or below, you'll need to polyfill the Web Crypto API. This is not required in Node.js 20, CloudFlare Workers, Deno, Bun, and Vercel Edge Functions. This can be done either by importing `webcrypto`, or by enabling an experimental flag. ```ts import { webcrypto } from "node:crypto"; @@ -72,6 +72,6 @@ const nextConfig = { ## Next steps -You can learn all the concepts and APIs by reading the [Basics section](/basics/sessions) in the docs. If you prefer writing code immediately, check out the [Tutorials](/tutorials) page or the [examples repository](https://github.com/lucia-auth/examples/tree/v3). +You can learn all the concepts and APIs by reading the [Basics section](/basics/sessions) in the docs. If you prefer writing code immediately, check out the [Tutorials](/tutorials) page or the [examples repository](https://github.com/lucia-auth/examples/tree/main). If you have any questions, [join our Discord server](https://discord.com/invite/PwrK3kpVR3)! diff --git a/docs/pages/getting-started/nextjs-pages.md b/docs/pages/getting-started/nextjs-pages.md index 3d5e1328e..691d22880 100644 --- a/docs/pages/getting-started/nextjs-pages.md +++ b/docs/pages/getting-started/nextjs-pages.md @@ -41,7 +41,7 @@ declare module "lucia" { ## Polyfill -If you're using Node.js 18 or below, you'll need to polyfill the Web Crypto API. This is not required in Node.js 20, CouldFlare Workers, Deno, Bun, and Vercel Edge Functions. This can be done either by importing `webcrypto`, or by enabling an experimental flag. +If you're using Node.js 18 or below, you'll need to polyfill the Web Crypto API. This is not required in Node.js 20, CloudFlare Workers, Deno, Bun, and Vercel Edge Functions. This can be done either by importing `webcrypto`, or by enabling an experimental flag. ```ts import { webcrypto } from "node:crypto"; @@ -80,6 +80,6 @@ export async function middleware(request: NextRequest): Promise { ## Next steps -You can learn all the concepts and APIs by reading the [Basics section](/basics/sessions) in the docs. If you prefer writing code immediately, check out the [Tutorials](/tutorials) page or the [examples repository](https://github.com/lucia-auth/examples/tree/v3). +You can learn all the concepts and APIs by reading the [Basics section](/basics/sessions) in the docs. If you prefer writing code immediately, check out the [Tutorials](/tutorials) page or the [examples repository](https://github.com/lucia-auth/examples/tree/main). If you have any questions, [join our Discord server](https://discord.com/invite/PwrK3kpVR3)! diff --git a/docs/pages/getting-started/nuxt.md b/docs/pages/getting-started/nuxt.md index cf13944ec..c2c00c531 100644 --- a/docs/pages/getting-started/nuxt.md +++ b/docs/pages/getting-started/nuxt.md @@ -45,7 +45,7 @@ declare module "lucia" { ## Polyfill -If you're using Node.js 18 or below, you'll need to polyfill the Web Crypto API. This is not required in Node.js 20, CouldFlare Workers, Deno, Bun, and Vercel Edge Functions. This can be done either by importing `webcrypto`, or by enabling an experimental flag. +If you're using Node.js 18 or below, you'll need to polyfill the Web Crypto API. This is not required in Node.js 20, CloudFlare Workers, Deno, Bun, and Vercel Edge Functions. This can be done either by importing `webcrypto`, or by enabling an experimental flag. ```ts import { webcrypto } from "node:crypto"; @@ -106,6 +106,6 @@ declare module "h3" { ## Next steps -You can learn all the concepts and APIs by reading the [Basics section](/basics/sessions) in the docs. If you prefer writing code immediately, check out the [Tutorials](/tutorials) page or the [examples repository](https://github.com/lucia-auth/examples/tree/v3). +You can learn all the concepts and APIs by reading the [Basics section](/basics/sessions) in the docs. If you prefer writing code immediately, check out the [Tutorials](/tutorials) page or the [examples repository](https://github.com/lucia-auth/examples/tree/main). If you have any questions, [join our Discord server](https://discord.com/invite/PwrK3kpVR3)! diff --git a/docs/pages/getting-started/solidstart.md b/docs/pages/getting-started/solidstart.md index f4d66c283..c46846037 100644 --- a/docs/pages/getting-started/solidstart.md +++ b/docs/pages/getting-started/solidstart.md @@ -103,6 +103,6 @@ export default defineConfig({ ## Next steps -You can learn all the concepts and APIs by reading the [Basics section](/basics/sessions) in the docs. If you prefer writing code immediately, check out the [Tutorials](/tutorials) page or the [examples repository](https://github.com/lucia-auth/examples/tree/v3). +You can learn all the concepts and APIs by reading the [Basics section](/basics/sessions) in the docs. If you prefer writing code immediately, check out the [Tutorials](/tutorials) page or the [examples repository](https://github.com/lucia-auth/examples/tree/main). If you have any questions, [join our Discord server](https://discord.com/invite/PwrK3kpVR3)! diff --git a/docs/pages/getting-started/sveltekit.md b/docs/pages/getting-started/sveltekit.md index 2ba4cf7b0..8fef2540f 100644 --- a/docs/pages/getting-started/sveltekit.md +++ b/docs/pages/getting-started/sveltekit.md @@ -99,6 +99,6 @@ export {}; ## Next steps -You can learn all the concepts and APIs by reading the [Basics section](/basics/sessions) in the docs. If you prefer writing code immediately, check out the [Tutorials](/tutorials) page or the [examples repository](https://github.com/lucia-auth/examples/tree/v3). +You can learn all the concepts and APIs by reading the [Basics section](/basics/sessions) in the docs. If you prefer writing code immediately, check out the [Tutorials](/tutorials) page or the [examples repository](https://github.com/lucia-auth/examples/tree/main). If you have any questions, [join our Discord server](https://discord.com/invite/PwrK3kpVR3)! diff --git a/docs/pages/tutorials/github-oauth/astro.md b/docs/pages/tutorials/github-oauth/astro.md index b55cf40b1..02fa0f571 100644 --- a/docs/pages/tutorials/github-oauth/astro.md +++ b/docs/pages/tutorials/github-oauth/astro.md @@ -6,10 +6,10 @@ title: "GitHub OAuth in Astro" Before starting, make sure you've set up your database and middleware as described in the [Getting started](/getting-started/astro) page. -An [example project](https://github.com/lucia-auth/examples/tree/v3/astro/github-oauth) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/astro/github-oauth). +An [example project](https://github.com/lucia-auth/examples/tree/main/astro/github-oauth) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/astro/github-oauth). ``` -npx degit https://github.com/lucia-auth/examples/tree/v3/astro/github-oauth +npx degit https://github.com/lucia-auth/examples/tree/main/astro/github-oauth ``` ## Create an OAuth App diff --git a/docs/pages/tutorials/github-oauth/index.md b/docs/pages/tutorials/github-oauth/index.md index e705c6b15..331cb73db 100644 --- a/docs/pages/tutorials/github-oauth/index.md +++ b/docs/pages/tutorials/github-oauth/index.md @@ -4,7 +4,7 @@ title: "Tutorial: GitHub OAuth" # Tutorial: GitHub OAuth -The tutorials go over how to implement a basic GitHub OAuth and cover the basics of Lucia along the way. As a prerequisite, you should be fairly comfortable with your framework and its APIs. Basic example projects are available in the [examples repository](https://github.com/lucia-auth/examples/tree/v3). +The tutorials go over how to implement a basic GitHub OAuth and cover the basics of Lucia along the way. As a prerequisite, you should be fairly comfortable with your framework and its APIs. Basic example projects are available in the [examples repository](https://github.com/lucia-auth/examples/tree/main). - [Astro](/tutorials/github-oauth/astro) - [Next.js App router](/tutorials/github-oauth/nextjs-app) diff --git a/docs/pages/tutorials/github-oauth/nextjs-app.md b/docs/pages/tutorials/github-oauth/nextjs-app.md index e2bea7b6b..7cecf4b8c 100644 --- a/docs/pages/tutorials/github-oauth/nextjs-app.md +++ b/docs/pages/tutorials/github-oauth/nextjs-app.md @@ -6,10 +6,10 @@ title: "GitHub OAuth in Next.js App router" Before starting, make sure you've set up your database and middleware as described in the [Getting started](/getting-started/nextjs-app) page. -An [example project](https://github.com/lucia-auth/examples/tree/v3/nextjs-app/github-oauth) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/nextjs-app/github-oauth). +An [example project](https://github.com/lucia-auth/examples/tree/main/nextjs-app/github-oauth) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/nextjs-app/github-oauth). ``` -npx degit https://github.com/lucia-auth/examples/tree/v3/nextjs-app/github-oauth +npx degit https://github.com/lucia-auth/examples/tree/main/nextjs-app/github-oauth ``` ## Create an OAuth App diff --git a/docs/pages/tutorials/github-oauth/nextjs-pages.md b/docs/pages/tutorials/github-oauth/nextjs-pages.md index 55533152a..550dcce79 100644 --- a/docs/pages/tutorials/github-oauth/nextjs-pages.md +++ b/docs/pages/tutorials/github-oauth/nextjs-pages.md @@ -6,10 +6,10 @@ title: "GitHub OAuth in Next.js Pages router" Before starting, make sure you've set up your database and middleware as described in the [Getting started](/getting-started/nextjs-pages) page. -An [example project](https://github.com/lucia-auth/examples/tree/v3/nextjs-pages/github-oauth) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/nextjs-pages/github-oauth). +An [example project](https://github.com/lucia-auth/examples/tree/main/nextjs-pages/github-oauth) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/nextjs-pages/github-oauth). ``` -npx degit https://github.com/lucia-auth/examples/tree/v3/nextjs-pages/github-oauth +npx degit https://github.com/lucia-auth/examples/tree/main/nextjs-pages/github-oauth ``` ## Create an OAuth App diff --git a/docs/pages/tutorials/github-oauth/nuxt.md b/docs/pages/tutorials/github-oauth/nuxt.md index 04ee141f8..684c7e532 100644 --- a/docs/pages/tutorials/github-oauth/nuxt.md +++ b/docs/pages/tutorials/github-oauth/nuxt.md @@ -6,10 +6,10 @@ title: "GitHub OAuth in Nuxt" Before starting, make sure you've set up your database and middleware as described in the [Getting started](/getting-started/nuxt) page. -An [example project](https://github.com/lucia-auth/examples/tree/v3/nuxt/github-oauth) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/nuxt/github-oauth). +An [example project](https://github.com/lucia-auth/examples/tree/main/nuxt/github-oauth) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/nuxt/github-oauth). ``` -npx degit https://github.com/lucia-auth/examples/tree/v3/nuxt/github-oauth +npx degit https://github.com/lucia-auth/examples/tree/main/nuxt/github-oauth ``` ## Create an OAuth App diff --git a/docs/pages/tutorials/github-oauth/sveltekit.md b/docs/pages/tutorials/github-oauth/sveltekit.md index 6d2e64451..d86c55cc7 100644 --- a/docs/pages/tutorials/github-oauth/sveltekit.md +++ b/docs/pages/tutorials/github-oauth/sveltekit.md @@ -6,10 +6,10 @@ title: "GitHub OAuth in SvelteKit" Before starting, make sure you've set up your database and middleware as described in the [Getting started](/getting-started/sveltekit) page. -An [example project](https://github.com/lucia-auth/examples/tree/v3/sveltekit/github-oauth) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/sveltekit/github-oauth). +An [example project](https://github.com/lucia-auth/examples/tree/main/sveltekit/github-oauth) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/sveltekit/github-oauth). ``` -npx degit https://github.com/lucia-auth/examples/tree/v3/sveltekit/github-oauth +npx degit https://github.com/lucia-auth/examples/tree/main/sveltekit/github-oauth ``` ## Create an OAuth App diff --git a/docs/pages/tutorials/index.md b/docs/pages/tutorials/index.md new file mode 100644 index 000000000..108e4c415 --- /dev/null +++ b/docs/pages/tutorials/index.md @@ -0,0 +1,25 @@ +--- +title: "Tutorials" +--- + +# Lucia Auth Tutorials + +Explore our tutorials for implementing Lucia Auth with GitHub OAuth or traditional username and password authentication in Astro, SvelteKit, Nuxt, and Next.js. + +## GitHub OAuth + +Learn to set up GitHub OAuth, handle authentication, and manage user sessions. + +- [Astro](/tutorials/github-oauth/astro) +- [SvelteKit](/tutorials/github-oauth/sveltekit) +- [Nuxt](/tutorials/github-oauth/nuxt) +- [Next.js](/tutorials/github-oauth/nextjs) + +## Username and Password + +Understand how to implement a secure username and password authentication system. + +- [Astro](/tutorials/username-and-password/astro) +- [SvelteKit](/tutorials/username-and-password/sveltekit) +- [Nuxt](/tutorials/username-and-password/nuxt) +- [Next.js](/tutorials/username-and-password/nextjs) diff --git a/docs/pages/tutorials/username-and-password/astro.md b/docs/pages/tutorials/username-and-password/astro.md index 6b79bbd51..4994cccec 100644 --- a/docs/pages/tutorials/username-and-password/astro.md +++ b/docs/pages/tutorials/username-and-password/astro.md @@ -6,10 +6,10 @@ title: "Tutorial: Username and password auth in Astro" Before starting, make sure you've set up your database and middleware as described in the [Getting started](/getting-started/astro) page. -An [example project](https://github.com/lucia-auth/examples/tree/v3/astro/username-and-password) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/astro/username-and-password). +An [example project](https://github.com/lucia-auth/examples/tree/main/astro/username-and-password) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/astro/username-and-password). ``` -npx degit https://github.com/lucia-auth/examples/tree/v3/astro/username-and-password +npx degit https://github.com/lucia-auth/examples/tree/main/astro/username-and-password ``` ## Update database diff --git a/docs/pages/tutorials/username-and-password/nextjs-app.md b/docs/pages/tutorials/username-and-password/nextjs-app.md index b56acee57..bb75dcdfb 100644 --- a/docs/pages/tutorials/username-and-password/nextjs-app.md +++ b/docs/pages/tutorials/username-and-password/nextjs-app.md @@ -6,10 +6,10 @@ title: "Username and password auth in Next.js App Router" Before starting, make sure you've set up your database as described in the [Getting started](/getting-started/nextjs-app) page. -An [example project](https://github.com/lucia-auth/examples/tree/v3/nextjs-app/username-and-password) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/nextjs-app/username-and-password). +An [example project](https://github.com/lucia-auth/examples/tree/main/nextjs-app/username-and-password) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/nextjs-app/username-and-password). ``` -npx degit https://github.com/lucia-auth/examples/tree/v3/nextjs-app/username-and-password +npx degit https://github.com/lucia-auth/examples/tree/main/nextjs-app/username-and-password ``` ## Update database diff --git a/docs/pages/tutorials/username-and-password/nextjs-pages.md b/docs/pages/tutorials/username-and-password/nextjs-pages.md index ac8325525..c3831adca 100644 --- a/docs/pages/tutorials/username-and-password/nextjs-pages.md +++ b/docs/pages/tutorials/username-and-password/nextjs-pages.md @@ -6,10 +6,10 @@ title: "Tutorial: Username and password auth in Next.js Pages router" Before starting, make sure you've set up your database and middleware as described in the [Getting started](/getting-started/nextjs-pages) page. -An [example project](https://github.com/lucia-auth/examples/tree/v3/nextjs-pages/username-and-password) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/nextjs-pages/username-and-password). +An [example project](https://github.com/lucia-auth/examples/tree/main/nextjs-pages/username-and-password) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/nextjs-pages/username-and-password). ``` -npx degit https://github.com/lucia-auth/examples/tree/v3/nextjs-pages/username-and-password +npx degit https://github.com/lucia-auth/examples/tree/main/nextjs-pages/username-and-password ``` ## Update database diff --git a/docs/pages/tutorials/username-and-password/nuxt.md b/docs/pages/tutorials/username-and-password/nuxt.md index 2d2e5bd83..4d2adcf52 100644 --- a/docs/pages/tutorials/username-and-password/nuxt.md +++ b/docs/pages/tutorials/username-and-password/nuxt.md @@ -6,10 +6,10 @@ title: "Tutorial: Username and password auth in Nuxt" Before starting, make sure you've set up your database and middleware as described in the [Getting started](/getting-started/nuxt) page. -An [example project](https://github.com/lucia-auth/examples/tree/v3/nuxt/username-and-password) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/nuxt/username-and-password). +An [example project](https://github.com/lucia-auth/examples/tree/main/nuxt/username-and-password) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/nuxt/username-and-password). ``` -npx degit https://github.com/lucia-auth/examples/tree/v3/nuxt/username-and-password +npx degit https://github.com/lucia-auth/examples/tree/main/nuxt/username-and-password ``` ## Update database diff --git a/docs/pages/tutorials/username-and-password/sveltekit.md b/docs/pages/tutorials/username-and-password/sveltekit.md index e42b2b218..2d32c9fd7 100644 --- a/docs/pages/tutorials/username-and-password/sveltekit.md +++ b/docs/pages/tutorials/username-and-password/sveltekit.md @@ -6,10 +6,10 @@ title: "Tutorial: Username and password auth in SvelteKit" Before starting, make sure you've set up your database and middleware as described in the [Getting started](/getting-started/astro) page. -An [example project](https://github.com/lucia-auth/examples/tree/v3/sveltekit/username-and-password) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/sveltekit/username-and-password). +An [example project](https://github.com/lucia-auth/examples/tree/main/sveltekit/username-and-password) based on this tutorial is also available. You can clone the example locally or [open it in StackBlitz](https://stackblitz.com/github/lucia-auth/examples/tree/v3/sveltekit/username-and-password). ``` -npx degit https://github.com/lucia-auth/examples/tree/v3/sveltekit/username-and-password +npx degit https://github.com/lucia-auth/examples/tree/main/sveltekit/username-and-password ``` ## Update database