Skip to content

dwaysweden/mba-auth

Repository files navigation

mba-auth

npm version npm downloads License Nuxt

New Nuxt module for authentication between nuxt and directus.

Features

  • 🔒 Authentication
  • 🔁 Rest/GraphQL

Quick Setup

  1. Add @digitalway/mba-auth dependency to your project
# Using pnpm
pnpm add -D @digitalway/mba-auth

# Using yarn
yarn add --dev @digitalway/mba-auth

# Using npm
npm install --save-dev @digitalway/mba-auth
  1. Add @digitalway/mba-auth to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@digitalway/mba-auth']
})

That's it! You can now use mba-auth in your Nuxt app ✨

Development

TO MAKE IT WORK WITH SELF-SIGNED CERTIFICATED YOU NEED TO ADD NODE_TLS_REJECT_UNAUTHORIZED='0' IN YOUR NUXT .ENV FILE DONT FORGET TO REMOVE THIS IN PRODUCTION.

# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release