
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@openpass/passport-openpass
Advanced tools
OpenPass authentication strategy for Passport using OpenID Connect.
Passport strategy for authenticating with OpenPass using OpenID Connect.
$ npm install @openpass/passport-openpass
The OpenPass strategy authenticates users using their OpenPass account. Before your application can make use of OpenPass's authentication system, you must first register your app with OpenPass. Once registered, a client ID and secret will be issued which are used by OpenPass to identify your app.
The OpenPass authentication strategy authenticates users using OpenPass. The strategy requires a verify callback, which accepts these credentials and calls done providing a user profileuser, as well as options specifying a client ID, client secret, and callback URL.
var OpenPassStrategy = require('passport-openpass');
passport.use(new OpenPassStrategy({
clientID: process.env['OPENPASS_CLIENT_ID'],
clientSecret: process.env['OPENPASS_CLIENT_SECRET'],
callbackURL: 'https://www.example.com/oauth2/redirect/openpass'
},
function verify(iss, profile, context, idToken, accessToken, refreshToken, done) {
console.log(profile.id);
//
});
}
));
Two routes are needed in order to allow users to log in with their OpenPass account. The first route redirects the user to the OpenPass, where they will authenticate:
app.get('/login/openpass', passport.authenticate('openpass'));
The second route processes the authentication response and logs the user in, after OpenPass redirects the user back to the app:
app.get('/callback',
passport.authenticate('openpass', { failureRedirect: '/login', failureMessage: true }),
function(req, res) {
res.redirect('/');
});
For a complete example, refer to the login example.
$ npm install --dev
$ make test
FAQs
OpenPass authentication strategy for Passport using OpenID Connect.
The npm package @openpass/passport-openpass receives a total of 3 weekly downloads. As such, @openpass/passport-openpass popularity was classified as not popular.
We found that @openpass/passport-openpass demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.