Skip to content

Commit

Permalink
Update Next.js getting started guide (#1474)
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowonpaper authored Mar 9, 2024
1 parent 85373d0 commit dd9e530
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docs/pages/getting-started/nextjs-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ Install Lucia using your package manager of your choice. While not strictly nece
npm install lucia oslo
```

**`oslo/password` does NOT work with Turbopack.**

## Initialize Lucia

Import `Lucia` and initialize it with your adapter. Refer to the [Database](/database) page to learn how to set up your database and initialize the adapter. Make sure you configure the `sessionCookie` option and register your `Lucia` instance type.
Expand Down Expand Up @@ -60,7 +58,7 @@ node --experimental-web-crypto index.js

## Update configuration

If you've installed Oslo, mark its dependencies as external to prevent it from getting bundled. This is only required when using the `oslo/password` module.
If you're planning to use `oslo/password` for hashing passwords, mark its dependencies as external to prevent it from getting bundled.

```ts
// next.config.ts
Expand All @@ -72,6 +70,14 @@ const nextConfig = {
};
```

In addition, if you're deploying to Vercel, you may need to manually install its dependencies.

```
npm install @node-rs/argon2 @node-rs/bcrypt
```

Currently, `oslo/password` cannot be used with Turbopack.

## 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/main).
Expand Down

0 comments on commit dd9e530

Please sign in to comment.