Creating AngularJS, Node and Token Authentication - p-patel/software-engineer-knowledge-base GitHub Wiki
https://app.pluralsight.com/library/courses/creating-apps-angular-node-token-authentication/
Introduction
- Growth in mobile app usage led to session/cookie-based authentication no longer being the best option
- For mobile-ready Web API
- Technology covered - authentication framework Sails, Yeoman, JWTs
- Concepts - OAuth, Email validation, CORS no longer an issue with JWTs
- What is a JWT? - works well with mobile. Consists of header, payload and signature. No database lookup require
Register in Front End Views
- Pre-requisites - Node.js,
- install Yeoman, bower, grunt, yeoman angular generator
- create application using yeoman angular generator
- run
grunt serve
to launch template application - template includes karma, jasmine and phantomjs - for more info see pluralsight 'Angular and Node.js' course by Alexander Zanfir
Register View
yo angular:view register
- can also be used to create controllers, services etc.
ui-router
- install ui-router (bower component) and configure state for
/register
App Theme
- Bootstrap themes from Bootswatch and theme from Bootsnipp
ui-sref active
- use to highlight current page in navigation