Hi im developing an app with symfony2 and AngularJS. I have a form that i send with $http service over post. Example the login form and the registration form.
The error i get its the classic CSRF token invalid, and that occur when resubmit the form.
The first time the form submit the process go well, the user login or register; but if i logout and try to resubmit the form with the same data to login again i get the error of invalid csrf token.
The in try to regenerate the token if the form its submited with:
$this->get('form.csrf_provider')->generateCsrfToken('authenticate');
and replace it on the view to the next time the form will have a new token to send, but i get the same error.
what im doing wrong?