Symfony2 App with RESTful authentication, using FOSRestBundle and FOSUserBundle
问题 I'm making REST API for my JS driven app. During login, the login form is submitted via AJAX to url /rest/login of my API. If the login is succesful, it returns 204 If it fails, it returns 401 While I have separated firewalls for the API and the app itself, they share the same context which should mean, that when user authenticates against the API, he's authenticated against the app too. So, when the server returns 204, page will reload and it should redirect user to the app, because he's now