/nextjs-14-laravel-jwt-auth-example

This project is an example of how to do JSON Web Token (JWT) based session management using Next.js and Laravel.

Primary LanguagePHP

JWT Session Management Example: Next.js and Laravel

This project is an example of how to do JSON Web Token (JWT) based session management using Next.js and Laravel. It includes both frontend (Next.js) and backend (Laravel) parts.

Packages used

Frontend

  • Next.js: It is a React-based framework used for server-side rendering (SSR) and static site generation (SSG).
  • React Hook Form: A library that simplifies form management in React applications. It provides control and management of form data.
  • Yup: JavaScript schema validation library. Used with React Hook Form for form validations.
  • React Query: it was used to manage API requests.
  • Mantine UI: A React component library used for user interface components and style management.

Backend

  • Laravel: it was used for user authentication and JWT creation.
  • tymon/jwt-auth: A package that manages JWT (JSON Web Token) validation and creation for Laravel. It was used to provide user authentication.

Note

You can see this project as a starter kit. Of course, there are shortcomings and areas that can be done better. You can contribute for this, I would appreciate it :)