title: symfony2 csrf token invalid on ajax request
body: <p>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.</p>
  
  <p>The error i get its the classic CSRF token invalid, and that occur when resubmit the form.</p>
  
  <p>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.</p>
  
  <p>The in try to regenerate the token if the form its submited with:</p>
  
  <p><i>$this->get('form.csrf_provider')->generateCsrfToken('authenticate');</i></p>
  
  <p>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.</p>
  
  <p>what im doing wrong?</p>