@enab/auth
v0.0.2-beta.29
Published
1. you need `.env`:
Readme
Usage
- you need
.env:
API_URL="http://localhost:3000"
API_VERSION="/v1"API_VERSION is optional.
- You need to extend
nuxt.config.ts
add the following to nuxt.config.ts:
extends: [
'@enab/auth',
],
enabAuth: {
// optional roles
roles: ['client', 'admin'],
redirects: {
// Defaults
login: '/auth/login',
logout: '/auth/login',
home: '/',
wrongRole: '/wrong-role'
},
// can be null if not dealing with subdomains or nested subdomains
subdomains: {
firstLevel: "restaurant", // eg => restaurant.enab.dev
secondLevel: null, // eg => admin.restaurant.enab.dev
},
}