New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hoist/node-sdk

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hoist/node-sdk

Node.js SDK for Hoist

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9
increased by200%
Maintainers
3
Weekly downloads
 
Created
Source

hoist-node-sdk

Node.js SDK for Hoist

Installation

$ npm install @hoist/node-sdk

Quick Start

var Hoist = require('@hoist/node-sdk');

//Use your API key from the Dashboard of your application
Hoist.setApiKey("xxx-xxx");

Creating Connector Authorization

Hoist.getBounceURL({
  connector: 'xxx',    
  bucketKey: 'xxx', //optional 
  returnUrl: 'xxx'  //optional
}).then(function(url) {
  reply.redirect(url);
});

or

Hoist.getBounceURL({
  connector: 'xxx',    
  bucketKey: 'xxx', //optional 
  returnUrl: 'xxx'  //optional
}, function(err, url) {
  reply.redirect(url);
});

Use the connector key you set up in the portal.

  • If both the return URL and bucket key are set; the user will be authenticated, the token is stored against them, and the user is redirected to the return URL.

  • If the return URL isn't set and the bucket key is set; the user will see a success screen showing the logo of the service they're connecting to and a success message.

  • If the return URL is set and the bucket key isn't set; the token will be appended to the URL in the querystring of the return URL on redirect.

  • If neither the return URL or bucket key are set; the user will see a success screen with the logo of the service they're connecting to, and the token that needs to be stored.

Listening to events

Hoist.on("EVENTNAME", function(event) {
  //event.payload contains the payload associated with the event
});

Removing event listeners

Hoist.off("EVENTNAME", function() { });
Hoist.off("EVENTNAME");

If you specify the method to remove, any other listener under that event will be retained. If you only specify the eventname, al events with that name will be removed.

Raising events

Hoist.raise("EVENTNAME", {});

FAQs

Package last updated on 01 Aug 2015

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