![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
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 'huspotb'
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 130 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.