Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 859 Bytes

File metadata and controls

17 lines (14 loc) · 859 Bytes

Epic Stack with CSRF Protection

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:

  1. Install remix-utils
  2. Generate the authenticity token in the root.tsx loader (be certain to commit the session to set the cookie)
  3. Wrap the App in the <AuthenticityTokenProvider /> and provide the token
  4. Render a Form with the <AuthenticityTokenInput /> component
  5. Verify in the Action using verifyAuthenticityToken and the session.