Auth is a plug'n play authentication package for any Laravel application.
Be sure to visit the official documentation at https://devdojo.com/auth/docs
To install this package you'll want to first have Laravel Breeze, Jetstream, Genesis, or any other Laravel starter kit installed. Then you'll need to install the package:
composer require devdojo/auth
After the package has been installed you'll need to publish the authentication assets, configs, and more:
php artisan vendor:publish --tag=auth:assets
php artisan vendor:publish --tag=auth:config
php artisan vendor:publish --tag=auth:ci
php artisan vendor:publish --tag=auth:migrations
Next, run the migrations:
php artisan migrate
Finally extend the `DevDojo\User
class User extends Devdojo\Auth\Models\User
in your App\Models\User
model.
Now, you're ready to rock! Auth has just been isntalled and you'll be able to visit the following authentication routes:
- Login (project.test/auth/login)
- Register (project.test/auth/register)
- Forgot Password (project.test/auth/register)
- Password Reset (project.test/auth/password/reset)
- Password Reset Token (project.test/auth/password/ReAlLyLoNgPaSsWoRdReSeTtOkEn)
- Password Confirmation (project.test/auth/password/confirm)
You can add all the social auth helpers to your user model by including the following Trait:
<?php
namespace App\Models;
use Devdojo\Auth\Traits\HasSocialProviders; // Import the trait
class User extends Devdojo\Auth\Models\User
{
use HasSocialProviders; // Use the trait in the User model
// Existing User model code...
}
The DevDojo Auth package is open-sourced software licensed under the MIT license.