Skip to content

Todo API using Express and Passport to authenticate bearer tokens.

License

Notifications You must be signed in to change notification settings

passport/todosapi-express-bearer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

todos-express-password

This app illustrates how to use Passport with Express to sign users in with a username and password. Use this example as a starting point for your own web applications.

Quick Start

To run this app, clone the repository and install dependencies:

$ git clone https://github.com/passport/todos-express-password.git
$ cd todos-express-password
$ npm install

Then start the server.

$ npm start

Navigate to http://localhost:3000.

Tutorial

Follow along with the step-by-step Username & Password Tutorial to learn how this app was built.

Overview

This example illustrates how to use Passport and the passport-local strategy within an Express application to sign users in with a username and password.

This app implements the features of a typical TodoMVC app, and adds sign in functionality. This app is a traditional web application, in which all application logic and data persistence is handled on the server.

User interaction is performed via HTML pages and forms, which are rendered via EJS templates and styled with vanilla CSS. Data is stored in and queried from a SQLite database.

After users sign in, a login session is established and maintained between the server and the browser with a cookie. As authenticated users interact with the app, creating and editing todo items, the login state is restored by authenticating the session.

License

The Unlicense

Credit

Created by Jared Hanson

About

Todo API using Express and Passport to authenticate bearer tokens.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published