Skip to content

Commit

Permalink
docs: use new nuxi module add command in installation
Browse files Browse the repository at this point in the history
* docs: use new `nuxi module add` command in installation

* Update README.md

---------

Co-authored-by: Sébastien Chopin <[email protected]>
  • Loading branch information
danielroe and atinux authored Apr 3, 2024
1 parent f4b3512 commit d64b9d3
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,13 @@ This module only works with SSR (server-side rendering) enabled as it uses serve

## Quick Setup

1. Add `nuxt-auth-utils` dependency to your project
1. Add `nuxt-auth-utils` in your Nuxt project

```bash
# Using pnpm
pnpm add -D nuxt-auth-utils

# Using yarn
yarn add --dev nuxt-auth-utils

# Using npm
npm install --save-dev nuxt-auth-utils
```

2. Add `nuxt-auth-utils` to the `modules` section of `nuxt.config.ts`

```js
export default defineNuxtConfig({
modules: [
'nuxt-auth-utils'
]
})
npx nuxi@latest module add auth-utils
```

3. Add a `NUXT_SESSION_PASSWORD` env variable with at least 32 characters in the `.env`.
2. Add a `NUXT_SESSION_PASSWORD` env variable with at least 32 characters in the `.env`.

```bash
# .env
Expand All @@ -57,7 +40,6 @@ Nuxt Auth Utils generates one for you when running Nuxt in development the first

3. That's it! You can now add authentication to your Nuxt app ✨


## Vue Composables

Nuxt Auth Utils automatically adds some plugins to fetch the current user session to let you access it from your Vue components.
Expand Down

0 comments on commit d64b9d3

Please sign in to comment.