Skip to content

Token Authentication layer for @wdalmut/mini-auth

Notifications You must be signed in to change notification settings

wdalmut/token-auth-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published