JSPM

passport-hubspot-oauth2.0

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 129
  • Score
    100M100P100Q79293F
  • License MIT

Passport strategy for authenticating with HubSpot using the OAuth 2.0 API.

Package Exports

  • passport-hubspot-oauth2.0

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (passport-hubspot-oauth2.0) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

passport-hubspot

Passport strategy for authenticating with HubSpot using the OAuth 2.0 API.

Installation

npm i passport-hubspot-oauth2.0

Usage

Configure Strategy

passport.use(new HubSpotStrategy({
    clientID: HUBSPOT_APP_ID,
    clientSecret: HUBSPOT_APP__SECRET,
    callbackURL: "http://myapp.dev/hubspot/callback"
  }, function(req, accessToken, refreshToken, profile, done) {
    // Verify callback.
  };
));

You can also define Hubspot Scope while configuring your Strategy.

passport.use(new HubSpotStrategy({
    clientID: HUBSPOT_APP_ID,
    clientSecret: HUBSPOT_APP__SECRET,
    callbackURL: "http://myapp.dev/hubspot/callback"
    scope: [contacts]
  }, function(req, accessToken, refreshToken, profile, done) {
    // Verify callback.
  };
));

** By default your Strategy is built based on those Scopes ['contacts', 'content', 'reports', 'social', 'automation', 'timeline'];

License

The MIT License