node package manager


Odesk authentication strategy for Passport.


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: ""
  function(token, tokenSecret, profile, done) {
    User.findOrCreate({ 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:


  passport.authenticate('odesk', { failureRedirect: '/login' }),
  function(req, res) {
    // Successful authentication, redirect home.

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: '',
        country: 'Russia',
        profile: '',
        emails: [ { value: '', type: 'work' } ],
        timezone: 'Europe/Klin',
        timezone_offset: '14400',
        location: { city: 'Klin', state: '', country: 'Russia' },
        company_url: ''

Install vows first

    $ npm install vows
    $ npm test

Build status -

The MIT License

Copyright (c) 2011-2013 Ostroumov Anatolij <>

Based on Plugin <> by Jared Hanson <>