Skip to content

marshall-kapfudza/event-planner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

backbone-login

Best practices for client-side authentication via Backbone.js AJAX.

The app demos the following:

  • CSRF headers in authentication requests to prevent forgery
  • Auth state persistence through signed cookies
  • Global (singleton) session model whose state changes can be listened to
  • Client-side validations through ParsleyJS
  • Salt/hashing of passwords for back-end storage

Client-Side

Uses a persistent global Backbone.js SessionModel to manage state. Views and other models all can:

  • subscribe to changes in session state
  • extract current user data
  • trigger auth events (login, logout, etc)

Server-Side

A lightweight, single-file Express.js server and SQLLite3 db. Responds to API routes, as well as initial index.html page render to plant the session CSRF token.

Install & Run

git clone https://github.com/marshall-kapfudza/meet-up-event-planner.git
cd meet-up-event-planner
npm install
node server.js

Then visit http://localhost:3000 in a browser.

Contribute

Please fork and submit a pull request with adequate details.

License

The MIT License (MIT)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published