
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
passport-odesk
Advanced tools
Passport strategy for authenticating with Odesk using the OAuth 1.0a API.
This module lets you authenticate using Odesk in your Node.js applications. By plugging into Passport, Odesk authentication can be easily and unobtrusively integrated into any application or framework that supports Connect-style middleware, including Express.
$ npm install passport-odesk
We need to get this keyes from Odesk api. For example, I used this values:
passport.use(new OdeskStrategy({
consumerKey: 'f448b92c4aaf8918c0106bd164a1656',
consumerSecret: 'e6a71b4f05467054',
callbackURL: "http://127.0.0.1:3000/auth/odesk/callback"
},
function(token, tokenSecret, profile, done) {
User.findOrCreate({ id: profile.id }, function (err, user) {
return done(err, user);
});
}
));
Use passport.authenticate()
, specifying the 'odesk'
strategy, to
authenticate requests.
For example, as route middleware in an Express application:
app.get('/auth/odesk',
passport.authenticate('odesk'));
app.get('/auth/odesk/callback',
passport.authenticate('odesk', { failureRedirect: '/login' }),
function(req, res) {
// Successful authentication, redirect home.
res.redirect('/');
});
For a complete, working example, refer to the signin example.
{
provider: 'odesk',
id: 'John_Doe',
name: { familyName: 'Doe', givenName: 'John' },
ref: '3603850',
displayName: 'John Doe',
img: 'https://odesk-prod-portraits.s3.amazonaws.com/Users:johnDoe:PortraitUrl_50?AWSAccessKeyId=1XVAX3FNQZAFC9GJCFR2&Expires=2147483647&Signature=P7XYYyZr9c%2Bvv%2F25voKeTg92eFc%3D',
country: 'Russia',
profile: 'https://www.odesk.com/users/~johnDoe',
emails: [ { value: 'JohnDoe@odesk.com', type: 'work' } ],
timezone: 'Europe/Klin',
timezone_offset: '14400',
location: { city: 'Klin', state: '', country: 'Russia' },
company_url: 'http://example.com'
}
Install vows first
$ npm install vows
$ npm test
Copyright (c) 2011-2013 Ostroumov Anatolij <http://teksi.ru/resume/>
Based on Plugin <https://github.com/jaredhanson/passport-twitter> by Jared Hanson <http://jaredhanson.net/>
FAQs
Odesk authentication strategy for Passport.
We found that passport-odesk 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
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.