FlaskWTF csrf exempt not working...throws The CSRF token is missing exception

Viewed 31

I am setting up a stripe webhook that sends a post request to an endpoint on successful transaction.

My flask route is setup as below:

@app.route("/success", methods=["POST"])
@csrf.exempt
def payment_success_webhook():

It was working until last month but started throwing this exception:

wtforms.validators.ValidationError: The CSRF token is missing

The method does not even call any Forms.

Not sure on how to fix this.

1 Answers

Try to downgrade FlaskWTF if you've upgraded it during this month.

Related