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

This package is auto-updated.

Last update: 2025-06-19 12:29:46 UTC


README

We're using Laravel Passport or Laravel Sanctum for api authetication.

Requirement:

  1. Laravel 9 and above
  2. Choose either Laravel Passport or Laravel Sanctum

Setup

  1. First, run php artisan migrate to setup migration in database
  2. If you're using Laravel Passport, please run php artisan passport:install to install oauth client key
  3. Extend use Zdirnecamlcs96\Auth\Models\User as Base
  4. Import either one of the Trait in app/Models/User.php file
use Laravel\Passport\HasApiTokens;
use Laravel\Sanctum\HasApiTokens;
  1. You may publish the config/authetication.php and modify the mode.
  2. 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