Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Route middleware functionality not working #51

Closed
emjoseph opened this issue Nov 20, 2014 · 2 comments
Closed

Route middleware functionality not working #51

emjoseph opened this issue Nov 20, 2014 · 2 comments
Labels
duplicate This issue or pull request already exists question Request for help or support

Comments

@emjoseph
Copy link

So I'm running twitter-passport w/ Express 4.0, but the route middleware functionality advertised isn't working for me. The reason is that I'm using this module in conjunction with an iOS app and I want to send a JSON object to the server instead of a simple redirect. Is there are anything wrong with my syntax?

Here's sample code:

app.get('/auth/twitterX/callback', passport.authenticate('twitter'),function(req,res){
    console.log("Made it past passport authen");    
    res.json({"status":"success"});
});

Basically I never get the console.log message displayed.

@bcharbonnier
Copy link

I think I have the exact same problem. w/ Express 4 (4.12.2) at the time Twitter should call us back on the callbackUrl, it simply timeout.

Myself, I am using res.redirect from within my callback, this is the only difference compare to @emjoseph example. I don't use res.json

@jaredhanson
Copy link
Owner

Duplicate of #46

@jaredhanson jaredhanson marked this as a duplicate of #46 Dec 5, 2018
@jaredhanson jaredhanson added question Request for help or support duplicate This issue or pull request already exists and removed type=question labels Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists question Request for help or support
Projects
None yet
Development

No branches or pull requests

3 participants