2

I am stuck trying to solve the problem, but ended up with here. This is the erroneous code repo.

I got an error saying:

Failed to load resource: the server responded with a status of 500(Internal Server Error)`

and for such a code snippet, it always redirected to the failure URL (/routes/auth.js):

.get(passport.authenticate('twitter',
    {
        successRedirect: '/users/',
        failureRedirect: '/error/'
    })
);

Based on the current commit, I can successfully get the token from Twitter API. The callback URL is as such:

http://localhost:3000/auth/twitter/callback?oauth_token=(token)&oauth_verifier=(token)

Questions:

  1. What went wrong?
  2. If trying to debug the error, how could I construct the error-first callback (I did NOT even know where and how to output debug logs)?
halfer
  • 19,824
  • 17
  • 99
  • 186
Leon
  • 811
  • 10
  • 21

0 Answers0