Skip to content

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

PHP + React Authentication Form

React PHP

A simple authentication form built with React for the frontend and PHP for the backend, using JWT tokens for access and refresh authentication.


🛠 Features

  • User registration and login
  • JWT-based access and refresh tokens
  • Logout functionality
  • React form using React Hook Form
  • Zustand store for managing user state
  • PHP backend for handling authentication
  • Cookie-based refresh token storage
  • Form validation with React Hook Form

💻 Tech Stack

Frontend:

  • TypeScript
  • React
  • Zustand
  • Axios

Backend:

  • PHP
  • Firebase JWT (firebase/php-jwt)
  • MySQL
  • Cookie-based refresh token handling

Login Page login

Registration Page signup

Profile Page profile


Installation

Backend (PHP)

  1. Clone the repository:
    git clone https://github.com/rahilevych/form-php.git
    cd php-form/backend
    composer install
  2. Config .env
  • JWT_ACCESS_SECRET=your_access_secret
  • JWT_REFRESH_SECRET=your_refresh_secret
  • DB_HOST=localhost
  • DB_NAME=your_db
  • DB_USER=root
  • DB_PASS=your_password
  1. php -S localhost:8000 -t public
    

Installation

Frontend (React)

cd php-form/frontned
cd auth-form
npm install
npm run dev


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages