1.0.1 • Published 11 months ago
@podiceps/auth v1.0.1
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
},
}