Looking to hire Laravel developers? Try LaraJobs

laravel-auth maintained by zdirnecamlcs96

Description
Authentication for laravel
Last update
2024/11/19 12:24 (dev-main)
Links
Downloads
7

Comments
comments powered by Disqus

Simple Auth for Laravel

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