FK7
FK7

Reputation: 43

How can I implement passport.js Twitter strategy for Restful Api?

I am making a simple restful API with Node.js and MongoDB. I want to use Twitter Strategy of Passport.js. There are tons of example for web apps. Routes are redirected to an HTML page. I don't want this. How can I solve my situation?

Upvotes: 0

Views: 483

Answers (1)

Ivan Vasiljevic
Ivan Vasiljevic

Reputation: 5718

You can check my tutorial here. I have explained the whole workflow.

You should use passport-twitter-token library. Passport-twitter is not the most suitable one for REST API. This was the biggest issue when I have been working on authentication with Twitter for REST API.

Upvotes: 1

Related Questions