Welcome Guest, Not a member yet? Register   Sign In
CSRF Protection with multiple js scripts

I think the problem is each script has it's own local variables csrfName and csrfHash. When you update the variables after the ajax request has returned, you only update the local variables. It doesn't update the ones in the other script. 
// Update CSRF hash
csrfName = res.csrfName;
csrfHash = res.csrfHash;

You should probably make these variables global so both scripts can use the same variables.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/

Messages In This Thread
RE: CSRF Protection with multiple js scripts - by includebeer - 07-06-2022, 01:08 PM

Theme © iAndrew 2016 - Forum software by © MyBB