Skip to content

MiniAuth is a minimalist, secure backend authentication system built with pure PHP and SQLite. It uses JWT tokens to protect API endpoints and offers a clean, modular structure ideal for small projects, prototypes, or educational use.

License

Notifications You must be signed in to change notification settings

MuradIsazade777/MiniAuth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔐 MiniAuth – Lightweight PHP JWT Authentication API

License Built with PHP Status
SQLite

MiniAuth is a minimalist, secure backend authentication system built with pure PHP and SQLite. It uses JWT tokens to protect API endpoints and offers a clean, modular structure ideal for small projects, prototypes, or educational use.

🚀 Features

  • ✅ Register & Login endpoints
  • 🔐 JWT token generation and validation
  • 🗂️ SQLite-based user storage
  • ⚡ Fast, lightweight, no frameworks
  • 📁 Modular file structure (6–7 files, ~70 lines of code)

📦 Requirements

  • PHP 8+
  • SQLite enabled (pdo_sqlite)
  • Git Bash or any terminal with PHP CLI

🧪 API Endpoints

🔐 Register

POST /register
Content-Type: application/json

{
  "username": "murad",
  "password": "123456"
}
🔑 Login
http
POST /login
Content-Type: application/json

{
  "username": "murad",
  "password": "123456"
}

👤 Profile (Protected)

GET /profile
Authorization: Bearer <JWT_TOKEN>
🛠️ Run Locally
bash
php -S localhost:8000
Test with curl or Postman.

📄 License This project is licensed under the MIT License. See LICENSE for details.

✨ Author Murad Isazade Backend Architect & Full-Stack Developer

🌟 Star this repo if you find it useful!

About

MiniAuth is a minimalist, secure backend authentication system built with pure PHP and SQLite. It uses JWT tokens to protect API endpoints and offers a clean, modular structure ideal for small projects, prototypes, or educational use.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages