@wdalmut/token-auth

0.0.1 • Public • Published

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))

Readme

Keywords

none

Package Sidebar

Install

npm i @wdalmut/token-auth

Weekly Downloads

7

Version

0.0.1

License

MIT

Unpacked Size

2.59 kB

Total Files

6

Last publish

Collaborators

  • wdalmut