Skip to content
This repository has been archived by the owner on Jan 9, 2021. It is now read-only.

informationdevelopment/auth0-serverless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auth0-serverless

Auth0 authentication for serverless functions.

This package is no longer maintained and should not be used.

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();
});

About

Auth0 authentication middleware for serverless functions.

Resources

License

Stars

Watchers

Forks