I need help with
csrf token when try use post method. How I can get token if I use React and Axios, I don’t have a access to template for get it from input:
<input id="csrfToken" type="hidden" value="<?= $this->request->getParam('_csrfToken') ?>">
Even if you don’t have access to the template as it is being rendered, don’t you have access to the resulting DOM? The token is written into that page and will be the value of the node with id ‘csrfToken’.
Failing that, you will have to record the csrfToken for that request/response in a session variable or something like that, then write a controller/action that your React/Axios code can call to get the value.