
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
gplus-web-auth
Advanced tools
Google+ login and authentication with client-side sessions for Node.js
Available via npm, to install it simply run the following line in your project:
npm install gplus-web-auth
The module takes three parameters,
/oauth2callback.var auth = require('gplus-web-auth')({
google: {
client_id: "applicationid123.apps.googleusercontent.com",
scope: ['profile', 'email'],
callbackPath: "/custom/oauth2callback"
},
session: {
cookieName: "gplusauth", // cookie name dictates the key name added to the request object
secret: "secret", // should be a large unguessable string
duration: 24 * 60 * 60 * 1000, // how long the session will stay valid in ms
activeDuration: 1000 * 60 * 5 // if expiresIn < activeDuration, the session will be extended by activeDuration milliseconds
},
authorize: function(req, user, done){
var authorized = (user.email.split('@')[1] === "application.com");
done(authorized);
}
});
Now simply use the auth object as a middleware on your app:
app.use(auth);
and use auth.verify middleware on routes that you wish should require authentication.
app.get('/admin', auth.verify, function(req, res) {
res.render('index');
});
Calling app.use(auth) sets up this route on your app: /oauth2callback to use for authentication callbacks.
Because this module uses client-side sessions - you do not need a session store on the server - hence easy to get up and running. But also you should not use Express's session middleware as it might conflict.
Sunil Pai, threepointone@gmail.com
Param Aggarwal, paramaggarwal@gmail.com
gplus-web-auth is available under the MIT license.
FAQs
Google Plus Login module for Node.js
The npm package gplus-web-auth receives a total of 1 weekly downloads. As such, gplus-web-auth popularity was classified as not popular.
We found that gplus-web-auth demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.