
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
passport-figma2
Advanced tools
A passport strategy for Figma authentication. Has support for profile information compared to passport-figma.
npm install passport-figma2
var express = require("express");
var session = require('express-session');
var cookieParser = require('cookie-parser');
var bodyParser = require("body-parser");
var passport = require("passport");
var FigmaStrategy = require('./lib/passport-figma').Strategy;
const app = express();
app.use(bodyParser.urlencoded({ extended: true }));
app.use(cookieParser());
app.use(session({
secret: 'hello',
resave: false,
saveUninitialized: true
}));
app.use(passport.initialize());
app.use(passport.session());
passport.use(new FigmaStrategy({
clientID: '<CLIENT_ID>',
clientSecret: '<CLIENT_SECRET>',
callbackURL: "http://localhost:3000/auth/figma/callback",
scope: "file_read",
response_type: 'code'
}, function(accessToken, refreshToken, profile, done) {
return done(null, profile);
}
));
passport.serializeUser(function(user, done) {
done(null, user);
});
passport.deserializeUser(function(user, done) {
done(null, user);
});
app.get('/', (req, res) => {
res.json(req.user);
});
app.get('/login', (req, res) => {
res.json({message: 'You are not logged in!'})
})
app.get('/auth/figma', passport.authenticate('figma', {state: 'somestate'}));
app.get(
'/auth/figma/callback',
passport.authenticate('figma', {failureRedirect: '/login'}),
(req, res) => {
// Successful Request - Redirect home
res.redirect('/');
}
);
app.listen(3000);
FAQs
Figma OAuth Strategy for Passport
The npm package passport-figma2 receives a total of 0 weekly downloads. As such, passport-figma2 popularity was classified as not popular.
We found that passport-figma2 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.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.