flask-wtf icon indicating copy to clipboard operation
flask-wtf copied to clipboard

Improve CSRF Documentation

Open israel-oye opened this issue 1 year ago • 0 comments

This update extends the documentation regarding CSRF protection in the library. Specifically, it provides additional insights into the 'csrf' input name configuration for Non-FlaskForms in preventing the common "CSRF token is missing." Users can now better understand the implication of the WTF_CSRF_FIELD_NAME config.

Additionally, a new example has been included in the JavaScript section that demonstrates how to send the 'csrf_token' as a Jinja2 variable (to the backend) with the Fetch API using a Vanilla JavaScript example. This example shows the proper implementation of CSRF protection when working with the Fetch API.

israel-oye avatar Oct 12 '23 16:10 israel-oye