{"SPA"}

Elegant token-based API access with AngularJS - engineering.talis.com

Learn how to handle token-based API access with AngularJS in an elegant, Don’t Repeat Yourself manner by globally transforming requests and handling failure and token re-issue using response interceptors.Single page web apps have been growing in popularity over the last couple of years, notable pioneers include Zendesk and airbnb.These applications, built using frameworks such as AngularJS, Ember, Backbone and Meteor are downloaded from the server and the source run within the user’s browser.Invariably during operation they’ll need to request additional data from the server or save state back to a database, typically through stateless REST APIs.Accessing these APIs securely is problematic.