Open
Description
I am using ReactOnRails.authenticityToken();
to get the CSRF token generated by csrf_meta_tags
. The problem is that when I send first request, it works fine as the token is valid. Whenever I send any subsequent API request, it returns the previously invalidated CSRF token and therefore I get ActionController::InvalidAuthenticityToken
. How can I refresh the CSRF token after each API request?