@wdalmut/token-auth

Token Authentication layer for @wdalmut/mini-auth

Usage no npm install needed!

<script type="module">
  import wdalmutTokenAuth from 'https://cdn.skypack.dev/@wdalmut/token-auth';
</script>

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