Download the PHP package wamesk/laravel-auth without Composer
On this page you can find all versions of the php package wamesk/laravel-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wamesk/laravel-auth
More information about wamesk/laravel-auth
Files in wamesk/laravel-auth
Package laravel-auth
Short Description OAuth2 authorization with API endpoints. Also includes registration process, login, password reset, email validation.
License MIT
Informations about the package laravel-auth
Laravel Auth
Sanctum authorization with API endpoints.
Also includes registration process, login, password reset, email validation.
Setup
Add the service provider to array of providers in config/app.php
Make sure you have \App\Models\User class. If you have it with different namespace or classname you can change it in config/wame-auth.php
Make changes to the config/auth.php
file:
Make changes to the config/passport.php
file:
Make changes in migrations database/migrations/2023_01_17_074644_create_activity_log_table.php
:
Optionally make changes to the config/eloquent-sortable.php
file:
Run migrations
Setup OAuth2
Set passport output in .env
file:
Configuration
This is the content of the file that will be published in config/wame-auth.php
Publishing Views
Publishing Translations
Modifications / Extensions
Edit/Add functions and documentation
-
create controller
AuthController.php
by following the example on the documentation below - Copy from vendor/wamesk/laravel-auth/routes/api.php to
routes/api.php
Add documentation to function Example:
app/Http/Controllers/v1/AuthController.php
Add data to login response / Edit function Example:
app/Http/Controllers/v1/AuthController.php
Example how you can add parameters to registration by using Observer: