You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Joseph Alves edited this page Apr 16, 2015
·
2 revisions
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.
fsa-pre-built.js
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.
app.js
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.