Hari-Nagarajan / fairgame

Tool to help us buy hard to find items.
GNU General Public License v3.0
2.44k stars 804 forks source link

Fix 403 error by using session id in CSRF token #760

Closed mbbush closed 3 years ago

mbbush commented 3 years ago

When I tested using an item that was in stock, checkout worked fine. But when the item I was actually looking for came into stock (several hours after I'd started running fairgame), I got a 403 response to the turbo_initiate call.

My thinking is that perhaps that 403 is from the session cookies having expired, so I wrote this code to refresh them.

mbbush commented 3 years ago

I'm now getting 403s even on test purchases right away, so I don't think that this is the cause of the issue.

mbbush commented 3 years ago

The problem was with the CSRF token all along. The actual session cookies have an expiration time that's a year in the future, so that's not the issue.