Laravel Auth Template is a starter authentication setup for Laravel projects. It includes Login, Register, Logout, and Email Verification powered by Mailgun. Authentication is handled with Sanctum for secure API tokens.
- User authentication: Login, Register, Logout
- Email verification via Mailgun
- Sanctum API token authentication
- Symfony Mailer integration
- PHP 8.1+
- Laravel 12+
- Composer
- npm
- Mailgun account + API key
- Database (MySQL, PostgreSQL, or SQLite)
git clone https://github.com/yourusername/laravel-auth-template.git
cd laravel-auth-template
composer install
npm install
cp .env.example .env
php artisan key:generate
php artisan migrateConfigure .env with your Mailgun credentials:
MAIL_MAILER=mailgun
MAILGUN_DOMAIN=your-domain.com
MAILGUN_SECRET=your-mailgun-api-key
MAIL_FROM_ADDRESS=auth@example.com
MAIL_FROM_NAME="LaravelAuthTemplate"Register → Creates user & sends verification email Verify Email → Activates user account Login → Issues Sanctum token Logout → Revokes token
Contributions are welcome. Use GitHub issues and pull requests to suggest improvements.
This project is licensed under the MIT License.