How is it possible that the token has a different value when it is called from a snippet in a resource and when it is from an ajax call in the same resource?
I have this line at the beginning of my snippet:
define( 'TOKEN' , $modx->user->getUserToken( $modx->context->get( 'web' ) );
When the user visits the home page the token has a value.
On this home page i have a button to send an ajax request and the same snippet is executed however the token has a different value
This issue prevents me to execute my ajax requests because the token should match between the main page and the ajax calls
Thank you for your help