zdirnecamlcs96 / laravel-auth
There is no license information available for the latest version (v1.0.0) of this package.
Authentication for laravel
v1.0.0
2022-07-13 15:59 UTC
Requires
- illuminate/database: ^9.17
- illuminate/http: ^9.17
- illuminate/support: ^9.17
- laravel/passport: ^10.4
- laravel/socialite: ^5.5
- laravel/ui: ^3.4.6
- spatie/laravel-permission: ^5.5
- zdirnecamlcs96/laravel-helpers: ^v2.1.0
Requires (Dev)
- phpunit/phpunit: ^9.5
README
We're using Laravel Passport or Laravel Sanctum for api authetication.
Requirement:
- Laravel 9 and above
- Choose either
Laravel Passport
orLaravel Sanctum
Setup
- First, run
php artisan migrate
to setup migration in database - If you're using Laravel Passport, please run
php artisan passport:install
to install oauth client key - Extend use
Zdirnecamlcs96\Auth\Models\User as Base
- Import either one of the Trait in
app/Models/User.php
file
use Laravel\Passport\HasApiTokens;
use Laravel\Sanctum\HasApiTokens;
- You may publish the
config/authetication.php
and modify themode
. - All done. You may test your auth with Postman.
Available Contracts
Contract | Description |
---|---|
- | - |
Available Tratis
Trait | Description |
---|---|
Zdirnecamlcs96\Auth\Traits\HasSocialIdentity |
Add SocialIdentity relationship with third party token |
Zdirnecamlcs96\Auth\Traits\HasContact |
Add Contact relationship with verification status |