Securing Single Page Apps and REST Services(jamesward.com) |
Securing Single Page Apps and REST Services(jamesward.com) |
It's funny because the author initially advocates against using cookies because they are susceptible to CSRF attacks, and then immediately suggests using cookies as part of this new scheme (albeit in a different way).
This is a good example of why you shouldn't design your own security system unless you are an expert in security and/or cryptography.
"The server validates the login information and creates an authentication token for the user"