An open API service indexing awesome lists of open source software.

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.

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`.