Curious as to how people usually handle this. My strategy is to have an authorized root route and unauthorized root route.
The authorized users get sent directly to my marionette.js single page application and unauthroized users get sent into a standard rails landing page with the option to login or register.
It seems you could combine these all into your single page application. You could show/hide ui elements based on a class you attach to elements based on the authorization needed to see them (registered, admin, moderator, etc). You could also add some kind of "before_filter" to your router's that can check whether or not the user can access this route given their role.
I'm not sure exactly how you would handle login / registration in this case. You could setup your own api routes that get POST'd to which hand-off the work to devise?
Thoughts? Strategies? What seems best practice here?
I find it painful and unnecessary to try and make Backbone/Marionette handle the authentication and re-loading of the authorized site stuff. Once they log in, redirect them to a different URL that the server handles, and have the server send down all the stuff that they need, as an authenticated user.