@wdalmut/token-auth
v0.0.1
Published
Token Authentication layer for @wdalmut/mini-auth
Downloads
28
Readme
Token Authentication layer for @wdalmut/mini-auth
A simple authentication layer for token auth
npm install --save @wdalmut/token-auth
Usage
token((token) => {
return Promise.resolve({id: 1, ...})
})(res)
Usage with @wdalmut/mini-auth
// just an example
const fromDB = (token) => {
return User.find(/*...*/),
};
auth(token(fromDb))