https://github.com/passport/express-3.x-local-example
Express 3.x app using Passport for authentication with username and password.
https://github.com/passport/express-3.x-local-example
Last synced: 8 months ago
JSON representation
Express 3.x app using Passport for authentication with username and password.
- Host: GitHub
- URL: https://github.com/passport/express-3.x-local-example
- Owner: passport
- License: unlicense
- Created: 2015-08-15T17:45:36.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-15T18:39:17.000Z (over 10 years ago)
- Last Synced: 2025-05-08T01:32:33.485Z (8 months ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 1
- 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-local-example](https://github.com/passport/express-4.x-local-example).
This example demonstrates how to use [Express](http://expressjs.com/) 3.x and
[Passport](http://passportjs.org/) to authenticate users using a username and
password with [form-based authentication](https://en.wikipedia.org/wiki/HTTP%2BHTML_form-based_authentication).
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-local-example.git
$ cd express-3.x-local-example
$ npm install
```
Start the server.
```bash
$ node server.js
```
Open a web browser and navigate to [http://localhost:3000/](http://127.0.0.1:3000/)
to see the example in action. Log in using username `jack` and password `secret`.