Simple Twitter User Authentication with Node.js, Express, Mongoose, and Passport
This is really a combined tutorial, stemmed from the amazing Jared Hanson and Pedro Teixeira. I just wanted to take a couple of examples one step further and produce a working Twitter authentication project using a Mongo database. Make sure you check out the tech, this is a common (and really fun) stack:
Check out my Github repo for the code. If you don’t have Mongo installed, head over their Quickstart page. After you clone the repo, create a location for the Mongo data.
~/Sites/twitter-mongo : mkdir data
Next, in another terminal start the Mongo database using the new data location.
~/Sites/twitter-mongo : mongod --dbpath ./data/
Last thing to do is put in your Twitter consumer key and consumer secret in the “app.js” file (make a Twitter app). Run node.
~/Sites/twitter-mongo : node app.js
Recent Comments
Archives
- April 2023
- January 2023
- November 2022
- May 2022
- March 2022
- January 2022
- December 2021
- April 2021
- December 2020
- October 2020
- August 2020
- July 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- October 2019
- January 2019
- December 2018
- November 2018
- August 2018
- July 2018
- April 2018
- March 2018
- November 2017
- October 2017
- February 2017
- October 2016
- August 2016
- July 2016
- November 2015
- October 2013
- February 2013
- January 2013
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- February 2012
- December 2011