Introduction
Auth Module for Nuxt 2.
Zero-boilerplate authentication support for Nuxt 2!
The module authenticates users using a configurable authentication scheme or by using one of the directly supported providers. It provides an API for triggering authentication and accessing resulting user information. While it takes care of storing the information on the client-side, it does NOT implement session handling or provide session based authentication on the NuxtJS server.
Nuxt 3 Support
Nuxt 3 comes with built-in utilities to support session and authentication. We are working on a new official module.
Meanwhile, we recommend:
- Nuxt Auth Utils
- Sidebase Nuxt Auth based on next-auth
- AuthJs Nuxt based on Auth.js
- Implement your own auth using Lucia or Nuxt Auth Template
Getting Started
If it is first time using this module, reading resources below in order is recommended:
- Add auth and axios modules
- Setup auth middleware
- Configure local scheme
- Customize options
- Use
$auth
service
You can also watch a video introduction by VueScreencasts. It covers the same material, but in the context of a working Nuxt app.