-
Couldn't load subscription status.
- Fork 71
08. fsa pre built.js
There is pre-made front-end Javascript code located at browser/js/fsa/fsa-pre-built.js. This and browser/js/app.js are the only two files that we suggest keeping in your application.
As of release 2.2, this file provides functionality for front-end authentication and socket connection. These functionalities are placed in a separate module named fsaPreBuilt.
The authentication pattern used depends on GET /session. It is based on ideas and strategies explored in this article.
browser/js/app.js is where the main Angular application is created. The fsaPreBuilt is merged into the application.
Also in this file is logic to enable HTML5 routing with ui-router as well as managing authenticated state change. Refer to browser/js/members-only/members-only.js for an example of creating a state that requires authentication.