Re:Facebook’s New React JavaScript Library Tutorial Rewritte...
by ConceitedCode on Thursday May 30, 2013 @03:11AM
(#5791335)
This seems to explain how to do it pretty well using angular.
http://www.frederiknakstad.com/authentication-in-single-page...
Re:Facebook’s New React JavaScript Library Tutorial Rewritte...
by peterhunt on Thursday May 30, 2013 @03:12AM
(#5791339)
There's a bunch of different ways to do this. For Instagram we use Django's normal login mechanisms which add a session cookie. Our calls to the REST backend include this cookie. It works pretty well for us.
I think Facebook.com does something similar.
Re:Facebook’s New React JavaScript Library Tutorial Rewritte...
by Cthulhu_ on Thursday May 30, 2013 @04:08AM
(#5791430)
Our web application / REST API actually uses two systems; for employees, it uses HTTP basic authentication, which is validated to LDAP via Spring Security. For customers, there's a security proxy in between the front-end and our API (IBM's WebSeal), so authentication's handled completely outside of our REST API.
Just a couple ideas.
What I don't understand is how you add login while keeping your REST backend stateless. How do you validate the request and make sure that it comes from the correct user and not just someone who forges the request without keeping a state on the server-side? Normally you just add a session.