This is an example of how to integrate the
remix-utils package utilities for
Cross-Site Request Forgery (CSRF)
protection with the Epic Stack. The easiest way to explore the example is to
pull up
the commit history.
Following the steps laid out in the Remix Utils docs is sufficient for this:
- Install
remix-utils - Generate the authenticity token in the
root.tsxloader (be certain to commit the session to set the cookie) - Wrap the App in the
<AuthenticityTokenProvider />and provide the token - Render a Form with the
<AuthenticityTokenInput />component - Verify in the Action using
verifyAuthenticityTokenand the session.