1.0.3 • Published 4 years ago
@informationdevelopment/azure-functions-auth0 v1.0.3
azure-functions-auth0
Auth0 authentication middleware for Azure Functions.
Installation
azure-functions-auth0 can be installed with NPM:
npm install @informationdevelopment/azure-functions-auth0
Usage
const azureFunctionsAuth0 = require('@informationdevelopment/azure-functions-auth0');
const auth = azureFunctionsAuth0.createMiddleware(
'example.auth0.com', // App domain
'https://example.azurewebsites.net/api' // API identifier (audience)
);
module.exports = auth('read:movies', async (context, req) => {
return db.getMovies();
});