From e9e6c1b142d7269dfe0c7cf3055fd3b64120abec Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sun, 16 Jun 2024 17:03:10 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- docs/2.guide/4.recipes/4.sessions-and-authentication.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/2.guide/4.recipes/4.sessions-and-authentication.md b/docs/2.guide/4.recipes/4.sessions-and-authentication.md index 8d8d55a438..80d4a4bda4 100644 --- a/docs/2.guide/4.recipes/4.sessions-and-authentication.md +++ b/docs/2.guide/4.recipes/4.sessions-and-authentication.md @@ -20,10 +20,8 @@ Additionally, we'll use [nuxt-aut-utils](https://github.com/Atinux/nuxt-auth-uti ### 1. Install nuxt-auth-utils - Install the [auth-utils](https://github.com/Atinux/nuxt-auth-utils) module using the `nuxi` CLI. - ```bash npx nuxi@latest module add auth-utils ``` @@ -38,7 +36,7 @@ NUXT_SESSION_PASSWORD=password-with-at-least-32-characters ### 2. Create a registration page -The first page we'll need is a page for users to register and create new accounts. Create a new Vue page in your Nuxt app at `/pages/register.vue` for user registration. This page should have a form with fields for email and password. We'll intercept the form submission using `@submit.prevent` and use the [`$fetch`](/docs/getting-started/data-fetching#fetch) utility to post the data to `/api/register`. This form POST will be received by Nuxt in an API route which we will set up next. +The first page we'll need is a page for users to register and create new accounts. Create a new Vue page in your Nuxt app at `/pages/register.vue` for user registration. This page should have a form with fields for email and password. We'll intercept the form submission using `@submit.prevent` and use the [`$fetch`](/docs/getting-started/data-fetching#fetch) utility to post the data to `/api/register`. This form POST will be received by Nuxt in an API route which we will set up next. If the request is successful, we'll navigate to the (soon to be created) `/users` page, which will be guarded and only be visible to logged in users. @@ -398,6 +396,6 @@ const { data: users } = await useFetch("/api/users"); ``` -### Complete! +### Complete We've successfully set up user registration and authentication in our Nuxt app. Users can now register, log in, and log out. We've also protected sensitive routes on the server and client side to ensure that only authenticated users can access them.