I have a Backbone application which handles public and private stuff.
Public => Login, Registration, News, etc.
Private => Chatting, other user specific information.
To secure the entire application I have a session-based authentication mechanism in node.js. This mechanism secures the backend-api. Now the question is how I can secure the front-end.
- How do I secure routes in Backbone
- How could I secure modules (requireJs) in Backbone
One idea I had was to split up the front-end into public and private and the server decides if it grants access to the private-assets.
What other front-end-secure concepts are out there?
To make it more specific: I want to check client-side if the user is authenticated and I want to restrict loading require-js modules to unauthenticated people (to save bandtwitch)