Welcome Guest, Not a member yet? Register   Sign In
Community Auth Token Name
#10

(This post was last modified: 01-18-2018, 11:19 PM by reesethebeast.)

Skunkbad,

After some trial and error, I just decided to change all of my AJAX code to use token versus my_token. This seems to work, for the first submission.

In a previous forum post of mine you stated "Since using a token removes it from the array of tokens, if you are using AJAX then you need to pass back a new token, and apply it to the hidden form element. You get a new token with $this->tokens->token();".

I have a table of records and a delete button on each row. As the first deletion works and the subsequent clicks fails, this means the token was removed from the jar. So based on your statement, I should pass back a new token from the AJAX call in my JSON response and update (via JQuery) the current hidden form element to contain the new token value, correct?
Reply


Messages In This Thread
Community Auth Token Name - by reesethebeast - 01-17-2018, 07:17 PM
RE: Community Auth Token Name - by skunkbad - 01-18-2018, 12:27 AM
RE: Community Auth Token Name - by reesethebeast - 01-18-2018, 06:42 AM
RE: Community Auth Token Name - by reesethebeast - 01-18-2018, 08:14 AM
RE: Community Auth Token Name - by skunkbad - 01-18-2018, 09:04 AM
RE: Community Auth Token Name - by reesethebeast - 01-18-2018, 09:29 AM
RE: Community Auth Token Name - by reesethebeast - 01-18-2018, 09:46 AM
RE: Community Auth Token Name - by skunkbad - 01-18-2018, 12:13 PM
RE: Community Auth Token Name - by reesethebeast - 01-18-2018, 02:21 PM
RE: Community Auth Token Name - by reesethebeast - 01-18-2018, 11:18 PM
RE: Community Auth Token Name - by skunkbad - 01-18-2018, 11:38 PM
RE: Community Auth Token Name - by reesethebeast - 01-20-2018, 08:20 PM
RE: Community Auth Token Name - by skunkbad - 01-20-2018, 10:16 PM
RE: Community Auth Token Name - by reesethebeast - 01-21-2018, 06:17 AM
RE: Community Auth Token Name - by skunkbad - 01-21-2018, 10:51 AM



Theme © iAndrew 2016 - Forum software by © MyBB