Download the PHP package mahbubur508/api-auth without Composer
On this page you can find all versions of the php package mahbubur508/api-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mahbubur508/api-auth
More information about mahbubur508/api-auth
Files in mahbubur508/api-auth
Package api-auth
Short Description A robust and fast REST API Authentication package for Laravel using Sanctum.
License MIT
Informations about the package api-auth
🚀 Laravel API Auth
A lightweight and secure REST API Authentication package for Laravel powered by Laravel Sanctum. Quickly add user registration, login, logout, and authenticated profile endpoints to your Laravel applications with minimal setup.
✨ Features
- 🔐 Laravel Sanctum powered authentication
- 🚀 Ready-to-use API endpoints
- 👤 User Registration
- 🔑 User Login
- 🚪 User Logout
- 🙍 Authenticated User Profile
- ⚙️ Configurable route prefixes
- 🎟️ Customizable token names
- 📦 Plug-and-play installation
- 📄 Consistent JSON responses
📋 Requirements
- PHP 8.1+
- Laravel 10.x / 11.x / 12.x / 13.x
- Laravel Sanctum
📦 Installation
Install the package via Composer:
⚙️ User Model Configuration
Ensure your User model uses Sanctum's HasApiTokens trait:
🗄️ Run Migrations
🔧 Publish Configuration
This will create:
⚙️ Configuration
🚀 API Endpoints
Add the following header to all requests:
📝 Register User
Endpoint
Request Body
🔑 Login User
Endpoint
Request Body
👤 Get Authenticated User
Endpoint
Headers
🚪 Logout User
Endpoint
Headers
📄 Example Response
Successful Login
🔒 Security Recommendations
For production environments:
- Enable HTTPS
- Configure CORS properly
- Use secure password validation
- Apply API rate limiting
- Rotate tokens when necessary
🛠 Customization
Change route prefix and token name from:
Example:
📄 License
The MIT License (MIT). See LICENSE for details.
👨💻 Author
Md. Mahbubur Rahman
Full-Stack Developer
- Laravel
- React.js
- Next.js
- REST APIs
- Docker & DevOps
❤️ Support
If you find this package useful, please consider:
⭐ Starring the repository
🐛 Reporting issues
🚀 Contributing improvements
Made with ❤️ by Md. Mahbubur Rahman
All versions of api-auth with dependencies
laravel/framework Version ^10.0|^11.0|^12.0
laravel/sanctum Version ^3.0|^4.0