Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
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 0 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
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.