Skip to content

findOrCreateUser returning undefined user for tumblr? #244

@gonzoramos

Description

@gonzoramos

Hi,

I am pretty new with everyauth, and I am blocked by a possible error / bug / silly thing on my part. I follow all of the instructions I can find but I have not been able to succesfully use the module to authenticate with tumblr. The key part that fails is:

everyauth.tumblr
  .consumerKey('mykey')
  .consumerSecret('mysecret')
  .findOrCreateUser( function (session, accessToken, accessSecret, tumblrUser) {
    return usersByTumblrName[tumblrUser.name] ||
      (usersByTumblrName[tumblrUser.name] = addUser('tumblr', tumblrUser));
  })
  .redirectPath('/');

where tumblrUser returns as 'undefined'. I even tried the example and it fails there as well...

/Users/gonzalo/Documents/Github/misc/prototypes/gonzalo-sites/myfeed/node_modules/everyauth/lib/modules/everymodule.js:348
  throw err;
        ^
TypeError: Cannot read property 'name' of undefined
    at Object._findOrCreateUser (/Users/gonzalo/Documents/Github/misc/prototypes/gonzalo-sites/myfeed/node_modules/everyauth/example/server.js:296:40)
    at Object.exec (/Users/gonzalo/Documents/Github/misc/prototypes/gonzalo-sites/myfeed/node_modules/everyauth/lib/step.js:47:21)
    at /Users/gonzalo/Documents/Github/misc/prototypes/gonzalo-sites/myfeed/node_modules/everyauth/lib/stepSequence.js:26:38
    at [object Object].fulfill (/Users/gonzalo/Documents/Github/misc/prototypes/gonzalo-sites/myfeed/node_modules/everyauth/lib/promise.js:42:25)
    at /Users/gonzalo/Documents/Github/misc/prototypes/gonzalo-sites/myfeed/node_modules/everyauth/lib/stepSequence.js:29:23
    at [object Object].fulfill (/Users/gonzalo/Documents/Github/misc/prototypes/gonzalo-sites/myfeed/node_modules/everyauth/lib/promise.js:42:25)
    at Parser.<anonymous> (/Users/gonzalo/Documents/Github/misc/prototypes/gonzalo-sites/myfeed/node_modules/everyauth/lib/modules/tumblr.js:18:17)
    at Parser.emit (events.js:67:17)
    at Object.onclosetag (/Users/gonzalo/Documents/Github/misc/prototypes/gonzalo-sites/myfeed/node_modules/everyauth/node_modules/xml2js/lib/xml2js.js:120:24)
    at emit (/Users/gonzalo/Documents/Github/misc/prototypes/gonzalo-sites/myfeed/node_modules/everyauth/node_modules/xml2js/node_modules/sax/lib/sax.js:322:32)

Any help would be greatly appreciated!
-G

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions