devdojo / auth
The auth package to make authentication in your laravel applications easy to use.
Installs: 9 263
Dependents: 1
Suggesters: 0
Security: 0
Stars: 536
Watchers: 2
Forks: 43
Language:Blade
Requires
- php: ^7.4|^8.0|^8.1|^8.2
- bacon/bacon-qr-code: ^3.0
- calebporzio/sushi: ^2.5
- codeat3/blade-phosphor-icons: ^2.0
- devdojo/config-writer: ^0.0.7
- illuminate/support: ^8.0|^9.0|^10.0|^11.0
- laravel/folio: ^1.0
- laravel/socialite: ^5.0
- livewire/livewire: ^3.0
- livewire/volt: ^1.0
- pragmarx/google2fa: ^8.0
Requires (Dev)
- alebatistella/duskapiconf: ^1.2
- larastan/larastan: ^2.0
- laravel/dusk: ^8.2
- laravel/pint: ^1.15
- orchestra/testbench: ^9.0
- pestphp/pest: ^2.34
- pestphp/pest-plugin-laravel: ^2.4
- phpstan/phpstan: ^1.11
- protonemedia/laravel-dusk-fakes: ^1.6
- dev-main
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.0.24
- 0.0.23
- 0.0.22
- 0.0.21
- 0.0.20
- 0.0.19
- dev-allow-registration-disabling
- dev-fix-background-uploads
- dev-artisancorpsmain
- dev-artisancorps-main
- dev-zackAJmain
- dev-socialiteControllerUserModel
- dev-updatingTests
- dev-testTests
- dev-required-imagick-ext
- dev-container-alignment-fix
- dev-fix-google-login-callback-error
- dev-facebookSocialAuthFix
- dev-update-social-provider-user
- dev-updateUserModel
- dev-loginLayoutFix
- dev-duskTestUpdates
- dev-interfaceImprovements
- dev-fixingConditionalColumns
- dev-addingLighthouseTests
- dev-fixingPreviewLinks
- dev-withFortify
- dev-workspace-help
- dev-main-bkup
- dev-newRestructure
- dev-restructure
This package is auto-updated.
Last update: 2024-11-18 14:02:57 UTC
README
About
Auth is a plug'n play authentication package for any Laravel application. We have closed issues for this repo and are recommending that anyone who wants to report an issue or make a suggestion to do so here: https://devdojo.com/questions. Additionally, we are open to any kind of Pull Request 😉
Be sure to visit the official documentation at https://devdojo.com/auth/docs
Installation
You can install this package into any new Laravel application, or any of the available Laravel Starter Kits.
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 Model:
use Devdojo\Auth\Models\User as AuthUser;
class User extends AuthUser
in your App\Models\User
model.
Now, you're ready to rock! Auth has just been installed 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)
- Two-Factor Challenge (project.test/auth/two-factor-challenge)
You'll also have access to the Two Factor Setup page
- Two-Factor Setup (project.test/user/two-factor-authentication)
When you need to logout, you can visit the Logout route
- Logout Route (project.test/auth/logout)
(Optional) Adding the HasSocialProviders Trait.
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... }
License
The DevDojo Auth package is open-sourced software licensed under the MIT license.