
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
passport-hubspot-oauth2
Advanced tools
Passport strategies for authenticating with Hubspot using OAuth 2.0.
This module lets you authenticate using HubSpot credentials in your Node.js applications. By plugging into Passport, HubSpot authentication can be easily and unobtrusively integrated into any application or framework that supports Connect-style middleware, including Express.
$ npm install passport-hubspot-oauth2
The HubSpot OAuth 2.0 authentication strategy authenticates users using a HubSpot
account and OAuth 2.0 tokens. The strategy requires a verify callback, which
accepts these credentials and calls done providing a user, as well as
options specifying a client ID, client secret, and callback URL.
var HubSpotStrategy = require( 'passport-hubspot-oauth2' ).Strategy;
passport.use(new HubSpotStrategy({
clientID: HUBSPOT_CLIENT_ID,
clientSecret: HUBSPOT_CLIENT_SECRET,
callbackURL: "http://yourdomain:3000/auth/hubspot/callback",
passReqToCallback : true
},
function(request, accessToken, refreshToken, profile, done) {
// Information is sent back here.
}
));
Use passport.authenticate(), specifying the 'hubspot' strategy, to
authenticate requests.
For example, as route middleware in an Express application:
app.get('/auth/hubspot',
passport.authenticate('google', { scope: 'contacts content' }
));
app.get( '/auth/hubspot/callback',
passport.authenticate( 'hubspot', {
successRedirect: '/auth/hubspot/success',
failureRedirect: '/auth/hubspot/failure'
}));
provider always set to `hubspot`
hub_id
hub_domain
user
user_id
app_id
expires_in
For a complete, working example, refer to the OAuth 2.0 example.
FAQs
HubSpot (OAuth2) authentication strategies for Passport.
The npm package passport-hubspot-oauth2 receives a total of 185 weekly downloads. As such, passport-hubspot-oauth2 popularity was classified as not popular.
We found that passport-hubspot-oauth2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers collaborating on the project.
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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.