diff --git a/articles/quickstart/webapp/nextjs/interactive.md b/articles/quickstart/webapp/nextjs/interactive.md index 20d02a1d1d..52f82369a8 100644 --- a/articles/quickstart/webapp/nextjs/interactive.md +++ b/articles/quickstart/webapp/nextjs/interactive.md @@ -54,7 +54,7 @@ The SDK will read these values from the Node.js process environment and automati ## Create the Auth0 SDK Client {{{ data-action=code data-code="src/lib/auth0.ts" }}} -Create a file at `src/lib.auth0.ts`. This file provides methods for handling authentication, sessions and user data. +Create a file at `src/lib/auth0.ts`. This file provides methods for handling authentication, sessions and user data. Then, import the `Auth0Client` class from the SDK to create an instance and export it as `auth0`. This instance is used in your app to interact with Auth0. @@ -67,13 +67,13 @@ The Next.js Middleware allows you to run code before a request is completed. Create a file at `src/middleware.ts`. This file is used to enforce authentication on specific routes. The `middleware` function intercepts incoming requests and applies Auth0's authentication logic. -The `matcher` configuration ensures that the middleware runs on all routes except for statis files and metadata. +The `matcher` configuration ensures that the middleware runs on all routes except for static files and metadata. ## Add the Landing Page Content {{{ data-action=code data-code="src/app/page.tsx" }}} The Landing page `src/app/page.tsx` is where users interact with your app. It displays different content based on whether the users is logged in or not. -Edit the file `src/app/page.tsx` to add the `auht0.getSession()` method to determine if the user is logged in by retrieving the user session. +Edit the file `src/app/page.tsx` to add the `auth0.getSession()` method to determine if the user is logged in by retrieving the user session. If there is no user session, the method returns `null` and the app displays the **Sign up** or **Log in** buttons. If a user sessions exists, the app displays a welcome message with the user's name and a **Log out** button.