This quickstart demonstrates how to add Auth0 authentication to a Nuxt.js application. You’ll build a secure single-page app with login, logout, and user profile features using the Auth0 Nuxt SDK.
1
Create a new project
Create a new Nuxt project for this Quickstart
Report incorrect code
Copy
Ask AI
npx nuxi@latest init auth0-nuxt-app
Open the project
Report incorrect code
Copy
Ask AI
cd auth0-nuxt-app
2
Install the Auth0 Nuxt SDK
Report incorrect code
Copy
Ask AI
npm add @auth0/auth0-nuxt && npm install
3
Setup your Auth0 App
Next up, you need to create a new app on your Auth0 tenant and add the environment variables to your project.You can choose to do this automatically by running a CLI command or do it manually via the Dashboard:
CLI
Dashboard
Run the following shell command on your project’s root directory to create an Auth0 app and generate a .env file: