0.6.0 • Published 7 years ago

micro-auth0 v0.6.0

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

micro-auth0

Helper to get user using Auth0

Installation

npm install --save micro-auth0

Usage

const { send } = require('micro');
const auth0 = require('micro-auth0');

module.exports = async (req,res) => {
  const user = await auth0(req, process.env.AUTH0_DOMAIN);
  if(!user) return send(res,403,{ error: "Forbidden" });
  return {
      date: new Date(),
      user: user
    };
};

changelog

  • 0.6.0 add mock
  • 0.5.0 throw errors
  • 0.4.0 refactor to user request library
  • 0.3.0 refactor to NOT use the Auth0 library
  • 0.2.0 add async-to-gen to support node 6
  • 0.1.0 initial version
0.6.0

7 years ago

0.5.0

7 years ago

0.4.0

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago