/express-4.x-twitter-example

Express 4.x app using Passport for authentication with Twitter.

Primary LanguageJavaScriptThe UnlicenseUnlicense

This example demonstrates how to use Express 4.x and Passport to authenticate users using Twitter. Use this example as a starting point for your own web applications.

Instructions

To install this example on your computer, clone the repository and install dependencies.

$ git clone git@github.com:passport/express-4.x-twitter-example.git
$ cd express-4.x-twitter-example
$ npm install

The example uses environment variables to configure the consumer key and consumer secret needed to access Twitter's API. Start the server with those variables set to the appropriate credentials.

$ CONSUMER_KEY=__TWITTER_CONSUMER_KEY__ CONSUMER_SECRET=__TWITTER_CONSUMER_SECRET__ node server.js

Open a web browser and navigate to http://127.0.0.1:8080/ to see the example in action.

Deploy