Skip to content

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

Notifications You must be signed in to change notification settings

blendo-app/passport-hubspot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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', 'content'],
    optional_scope: ['timeline']
  }, function(req, accessToken, refreshToken, profile, done) {
    // Verify callback.
  };
));

** By default your Strategy is built based on those Scopes ['contacts'];

License

The MIT License

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published