
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
passport-ropc
Advanced tools
ROPC is a form of OAuth for trusted first party development, rather than redirecting the user to a website to log in separately and approve access a log in (as is typical for traditional OAuth) the user provides the password to the app that has implemnted ROPC. Because the user provides the password directly to the implementing app, it should only be used by first-party app development.
const express = require('express');
const passport = require('passport');
const OAuth2RopcStrategy = require('passport-ropc').OAuth2RopcStrategy;
passport.use(new OAuth2RopcStrategy({
baseURL: 'http://test.com',
accessTokenURL: '/token',
clientId: '123'
}, function verify(accessToken, refreshToken, results, done) {
// Verify that the user exists / has these tokens, then call done()
done(null, results);
}));
passport.serializeUser(function serialize(user, done) {
done(null, user);
});
passport.deserializeUser(function deserialize(user, done) {
done(null, user);
});
const app = express();
// Bring your own bodyparser & session/cookie management
app.post(
'/login',
passport.authenticate('oauth2-ropc', { failureRedirect: '/', failureFlash: true, grant_type: 'password' }),
(req, res) => {
// Login success, req.user should now be defined
res.redirect('/');
},
);
app.post(
'/refresh',
passport.authenticate('oauth2-ropc', { failureRedirect: '/', failureFlash: true, grant_type: 'refresh_token' }),
(req, res) => {
// Login success, req.user should now be defined
res.redirect('/');
},
);
FAQs
Passport strategy for OAuth ROPC
The npm package passport-ropc receives a total of 7 weekly downloads. As such, passport-ropc popularity was classified as not popular.
We found that passport-ropc 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
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.