Download the PHP package innonazarene/sanctum-auth-kit without Composer
On this page you can find all versions of the php package innonazarene/sanctum-auth-kit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download innonazarene/sanctum-auth-kit
More information about innonazarene/sanctum-auth-kit
Files in innonazarene/sanctum-auth-kit
Package sanctum-auth-kit
Short Description One-command Laravel Sanctum auth boilerplate (register, login, logout, me, change password, forgot/reset password, email verification) with an AuthController, routes, and Scramble API docs installed automatically.
License MIT
Informations about the package sanctum-auth-kit
Sanctum Auth Kit
One-command Laravel Sanctum auth boilerplate. Installs a full token-based AuthController (register, login, logout, me, change password, forgot/reset password, email verification), wires up the routes, and installs Scramble so your API docs are live at /docs/api — all from a single artisan command.
Requirements
- PHP ^8.1
- Laravel ^10.0 | ^11.0 | ^12.0 | ^13.0
Installation
That single install command will:
- Publish Laravel Sanctum's config and migration.
- Add the
HasApiTokenstrait toApp\Models\User(only if it's not already there). - Publish
App\Http\Controllers\Api\AuthController. - Publish the auth form requests to
App\Http\Requests\Auth:LoginRequestRegisterRequestChangePasswordRequestForgotPasswordRequestResetPasswordRequest
- Publish
routes/auth.phpand require it fromroutes/api.php. - Publish Scramble's config so
/docs/apiserves generated OpenAPI docs for the new endpoints.
Run php artisan migrate afterwards to create the personal_access_tokens table.
Pass --force to overwrite files that already exist:
Generated endpoints
Routes are published to routes/auth.php and required from routes/api.php, so Laravel's default api route-group prefix applies — every endpoint below is served under /api.
| Method | URI | Auth required | Description |
|---|---|---|---|
| POST | /api/auth/register |
Register + issue a token | |
| POST | /api/auth/login |
Login + issue a token | |
| POST | /api/auth/forgot-password |
Send a password reset link | |
| POST | /api/auth/reset-password |
Reset password via token | |
| GET | /api/auth/verify-email/{id}/{hash} |
signed | Verify email address |
| POST | /api/auth/logout |
✅ | Revoke the current token |
| GET | /api/auth/me |
✅ | Get the authenticated user |
| POST | /api/auth/change-password |
✅ | Change password |
| POST | /api/auth/email/verification-notification |
✅ | Resend verification email |
If routes/api.php doesn't exist yet (a plain Laravel 11+ skeleton doesn't ship one), the installer creates it and registers it in bootstrap/app.php automatically.
All published files are plain Laravel code — edit them freely after installation, this package does not hook into them afterwards.
License
MIT
All versions of sanctum-auth-kit with dependencies
laravel/framework Version ^10.0|^11.0|^12.0|^13.0
laravel/sanctum Version ^3.3|^4.0
dedoc/scramble Version ^0.11|^0.12|^0.13