Setup

Check the Nuxt.js documentation for more information about installing and using modules in Nuxt.js.

Installation

This docs are for next version of nuxt-auth module which is unstable. Use with caution!

Add @nuxtjs/auth-next @nuxtjs/axios dependencies to your project:

yarn add @nuxtjs/auth-next @nuxtjs/axios
npm install @nuxtjs/auth-next @nuxtjs/axios

Then, add @nuxtjs/xxx to the modules section of nuxt.config.js:

nuxt.config.js
{
  modules: [
    '@nuxtjs/axios',
    '@nuxtjs/auth-next'
  ],
  auth: {
    // Options
  }
}

IMPORTANT When adding auth-module to a new Nuxt project ensure you have activated the Vuex store. More information on how to do that can be found on the Nuxt Getting Started Guide.

On this page