Skip to content

kentcdodds/epic-stack-with-csrf

Repository files navigation

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.

About

An example of the Epic Stack with CSRF protection on forms

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published