Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 723 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 723 Bytes

This project is a code example where the @edge-csrf/core library is implemented along with Next.js to generate and validate CSRF tokens.

Important files:

  • /src/constants.ts
  • /src/middleware.ts
  • /src/app/page.tsx
  • /src/app/components/Login/Login.tsx
  • /src/app/api/login/route.ts
  • /src/utils/csrfTokens.ts
  • /src/actions/deleteCsrfCookieAction.ts

Run the project

This is a Next.js project bootstrapped with yarn create next-app.

Install dependencies

yarn install

Run the development server:

yarn dev

Open http://localhost:3000 with your browser to see the result.