Can you post the gist of your code which returns promise.

Thanks
Amal.

On Wed, Jun 6, 2012 at 1:23 AM, Skyler Brungardt <[email protected]>wrote:

> Hey Amal,
>
> They already are getting called earlier than express being configured with
> everyauth as middleware, and the second error I included in the original
> post is what I receive when I return a promise or a value.  Any other
> ideas?  :-)
>
> Thanks!
>
>
>
>
> -Skyler
>
>
>
> On Jun 5, 2012, at 15:44 PM, Amal wrote:
>
> > everyauth.facebook
> >        .appId('[[my app id]]')
> >        .appSecret('[[my app secret key]]')
> >        .scope('email')
> >        .handleAuthCallbackError(function(req, res) {
> >        })
> >        .findOrCreateUser(function(session, accessToken, accessTokExtra,
> fbUserMetaData) {
> >                console.log(fbUserMetaData);
> >        })
> >        .redirectPath('/');
> >
> > The above lines should be called before the express app is configured
> with the everyauth middleware.
> > And findOrCreateUser should return a promise that might get fulfilled
> later.
> >
> >
> > On Tue, Jun 5, 2012 at 10:42 PM, Skyler Brungardt <
> [email protected]> wrote:
> > Hey folks,
> >
> > I'm running into an error with evryauth that I can't seem to suss out,
> and which doesn't seem to be covered in any of the docs or the tutorials
> available.  I'm using it for Facebook and Google integration, and the error
> is similar for each.  If anyone here knows how to solve this, or can help
> point me in the direction of a solution, I'd really appreciate it.  Thanks!
> >
> > Error for Facebook:
> >
> >
> /Users/skyler/github/speek-node/node_modules/everyauth/lib/modules/everymodule.js:348
> >  throw err;
> >       ^
> > Error: Step getSession of `facebook` is promising: session ; however,
> the step returns nothing. Fix the step by returning the expected values OR
> by returning a Promise that promises said values.
> >   at Object.exec
> (/Users/skyler/github/speek-node/node_modules/everyauth/lib/step.js:68:11)
> >   at
> /Users/skyler/github/speek-node/node_modules/everyauth/lib/stepSequence.js:26:38
> >   at [object Object].fulfill
> (/Users/skyler/github/speek-node/node_modules/everyauth/lib/promise.js:42:25)
> >   at
> /Users/skyler/github/speek-node/node_modules/everyauth/lib/stepSequence.js:29:23
> >   at [object Object].fulfill
> (/Users/skyler/github/speek-node/node_modules/everyauth/lib/promise.js:42:25)
> >   at
> /Users/skyler/github/speek-node/node_modules/everyauth/lib/modules/facebook.js:45:9
> >   at passBackControl
> (/Users/skyler/github/speek-node/node_modules/everyauth/node_modules/oauth/lib/oauth2.js:79:9)
> >   at IncomingMessage.<anonymous>
> (/Users/skyler/github/speek-node/node_modules/everyauth/node_modules/oauth/lib/oauth2.js:94:7)
> >   at IncomingMessage.emit (events.js:88:20)
> >   at HTTPParser.parserOnMessageComplete [as onMessageComplete]
> (http.js:127:21)
> >
> > Google auth throws a similar one.
> >
> > Here's the code I have setting up the Facebook connector:
> >
> > everyauth.facebook
> >        .appId('[[my app id]]')
> >        .appSecret('[[my app secret key]]')
> >        .scope('email')
> >        .handleAuthCallbackError(function(req, res) {
> >        })
> >        .findOrCreateUser(function(session, accessToken, accessTokExtra,
> fbUserMetaData) {
> >                console.log(fbUserMetaData);
> >        })
> >        .redirectPath('/');
> >
> > When I return data or set a promise instead of
> `console.log(fbUserMetaData)` I'm thrown the following error:
> >
> > timers.js:96
> >           if (!process.listeners('uncaughtException').length) throw e;
> >                                                                     ^
> > Error: Step getAccessToken of `facebook` module timed out.
> >   at
> /Users/skyler/github/speek-node/node_modules/everyauth/lib/step.js:121:18
> >   at Object.<anonymous>
> (/Users/skyler/github/speek-node/node_modules/everyauth/lib/promise.js:65:27)
> >   at Timer.ontimeout (timers.js:94:19)
> >
> >
> >
> > Help me, node-i-wan-kenobe, you're my only hope!
> >
> >
> >
> >
> > -Skyler
> >
> >
> >
> > --
> > Job Board: http://jobs.nodejs.org/
> > Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> > You received this message because you are subscribed to the Google
> > Groups "nodejs" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> > http://groups.google.com/group/nodejs?hl=en?hl=en
> >
> >
> > --
> > Job Board: http://jobs.nodejs.org/
> > Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> > You received this message because you are subscribed to the Google
> > Groups "nodejs" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> > http://groups.google.com/group/nodejs?hl=en?hl=en
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to