@podiceps/auth
v1.0.2
Published
auth middleware
Downloads
70
Readme
Podiceps auth middleware
wait for login before request
$ npm i @podiceps/auth -S
Usage
import auth from '@podiceps/auth'
const { login, logout, middleware } = auth()
podiceps.use([middleware])
login() // after login, start request
logout() // logout
// ignore login config
import Podiceps from '@podiceps/core'
const configs = {
next: {
path: '/next',
login: false, // not need login to request
},
}