https://github.com/passport/express-3.x-twitter-example
Express 3.x app using Passport for authentication with Twitter.
https://github.com/passport/express-3.x-twitter-example
Last synced: 8 months ago
JSON representation
Express 3.x app using Passport for authentication with Twitter.
- Host: GitHub
- URL: https://github.com/passport/express-3.x-twitter-example
- Owner: passport
- License: unlicense
- Created: 2015-07-17T23:44:38.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-15T18:31:24.000Z (over 10 years ago)
- Last Synced: 2025-05-08T01:30:42.981Z (8 months ago)
- Language: JavaScript
- Size: 125 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**NOTE:** This example uses an outdated version of Express. For an example
using the latest version, refer to [express-4.x-twitter-example](https://github.com/passport/express-4.x-twitter-example).
This example demonstrates how to use [Express](http://expressjs.com/) 3.x and
[Passport](http://passportjs.org/) 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.
```bash
$ git clone git@github.com:passport/express-3.x-twitter-example.git
$ cd express-3.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.
```bash
$ 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:3000/](http://127.0.0.1:3000/)
to see the example in action.