Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
passport-oauth2-oidc
Advanced tools
OAuth2 + OpenID Connect (OIDC) authentication strategy for Passport.
This is a fork of passport-openidconnect (the original project seems unmaintained).
The goal is to have a unified passport strategy for OAuth2 and OpenID Connect (OIDC), as OIDC is an identity layer built on top of OAuth2.
npm install passport-oauth2-oidc
or
yarn add passport-oauth2-oidc
Here's a minimal working example:
const express = require('express');
const app = express();
const passport = require('passport');
const OIDCStrategy = require('passport-oauth2-oidc').Strategy;
passport.use(new OIDCStrategy({
passReqToCallback: true,
issuer: 'https://api.mpin.io',
authorizationURL: 'https://api.mpin.io/authorize',
tokenURL: 'https://api.mpin.io/oidc/token',
userInfoURL: 'https://api.mpin.io/oidc/userinfo',
scope: 'openid profile email email_verified',
clientID: '...',
clientSecret: '...',
callbackURL: '/auth/miracl/callback',
}));
const auth = passport.authenticate('oauth2-oidc', function(req, iss, sub, profile, done) {
return done(null, profile);
});
app.get('/', auth, (req, res) => {
res.send(`Hello ${req.user.email}!`)
});
const port = 3000;
app.listen(port, () => {
console.log(`Ready: http://localhost:${port}/`)
});
FAQs
OAuth2 + OpenID Connect (OIDC) authentication strategy for Passport.
The npm package passport-oauth2-oidc receives a total of 0 weekly downloads. As such, passport-oauth2-oidc popularity was classified as not popular.
We found that passport-oauth2-oidc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.