Socket
Socket
Sign inDemoInstall

hapi-twilio-auth

Package Overview
Dependencies
80
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-twilio-auth

Hapi plugin for Twilio webhook authentication


Version published
Maintainers
1
Weekly downloads
53
increased by35.9%

Weekly downloads

Readme

Source

hapi-twilio-auth

Hapi plugin for Twilio request validation.

install

npm i hapi-twilio-auth

usage

import hapi from '@hapi/hapi'
import hapiTwilioAuth from 'hapi-twilio-auth'

const { Server } = hapi

async function startServer() {
  const server = new Server({
    port: 3000,
  })

  await server.register(hapiTwilioAuth)

  server.auth.strategy('twilio-auth', 'twilio-signature', {
    baseUrl: 'https://mycompany.com/webhooks-path', // your twilio webhooks base url
    twilioAuthToken: 'xxxxxxxxxxx', // your twilio auth token
  })

  server.route({
    method: 'POST',
    path: '/',
    handler(request, h) {
      // ...
    },
  })

  await server.start()
}

startServer()

Keywords

FAQs

Last updated on 26 Jun 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc