CSRF Tokens: Preventing Onboarding Tour Issues
When building interactive tours, ensure all API requests include CSRF tokens to prevent unexpected failures. Let's look at a recent fix in Reimpact/platform, a project focused on modernizing user interaction flows. The team addressed an issue where the onboarding tour restarted on every page load.
The Problem: Missing CSRF Tokens
The tour's JavaScript fetch calls lacked the X-CSRF-TOKEN