Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

auth0-extension-hapi-tools

Package Overview
Dependencies
Maintainers
31
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth0-extension-hapi-tools

A set of tools and utilities to simplify the development of Auth0 Extensions with Hapi.

  • 1.2.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-75.76%
Maintainers
31
Weekly downloads
 
Created
Source

Auth0 Extension Tools for Hapi

A set of tools and utilities to simplify the development of Auth0 Extensions with Hapi.

Usage

const hapiTools = require('auth0-extension-hapi-tools');

Middlewares

A middleware to inject the Management API Client for Node.js on the current request:

const middlewares = require('auth0-extension-express-tools').middlewares;

module.exports.register = (server, options, next) => {
  server.decorate('server', 'handlers', {
    managementClient: middlewares.managementApiClient({
      domain: config('AUTH0_DOMAIN'),
      clientId: config('AUTH0_CLIENT_ID'),
      clientSecret: config('AUTH0_CLIENT_SECRET'),
      logger: console.log
    })
  });

  next();
};

Url Helpers

const urlHelpers = require('auth0-extension-express-tools').urlHelpers;

// Eg: /api/run/mytenant/abc/
const basePath = urlHelpers.getBasePath(req);

// Eg: http://sandbox.it.auth0.com/api/run/mytenant/abc
const baseUrl = urlHelpers.getBaseUrl(req);

// Eg: http://tenant.us.webtask.io/abc
const webtaskUrl = urlHelpers.getWebtaskUrl(req);

Keywords

FAQs

Package last updated on 19 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc