0.1.2 • Published 4 years ago

@informationdevelopment/auth0-serverless v0.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

auth0-serverless

Auth0 authentication for serverless functions.

Installation

auth0-serverless can be installed with NPM:

npm install @informationdevelopment/auth0-serverless

Usage

const auth0 = require('@informationdevelopment/auth0-serverless');

const client = auth0.createClient(
    'example.auth0.com',                    // App domain
    'https://example.azurewebsites.net/api' // API identifier (audience)
);

module.exports = client.authorize('read:movies', async (context, req) => {
    return db.getMovies();
});