Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Security js_fetch_token not returning anything
  • I've upgraded to 1.61 and getting the csrf token via javascript doesn't seem to be working, before any other JS runs I have 

    echo \Security::js_fetch_token();

    when I look at the source the function is printing, my cookie settings have http_only set to false, am I missing any other config settings that might attribute to this?

  • Hi,

    What print the js_fetch_token() function ? In my environment, it's print the correct js function
  • As you say it is printed, so the method call works.

    However, it only defines the javascript function, you still have to call it to get the CSRF token back.
  • Yeah I grab it within an ajax handler but when I changed the config setting security.csrf_expiration to an integer > 0 it works

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion