PHPackages                             devdojo/auth - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. devdojo/auth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

devdojo/auth
============

The auth package to make authentication in your laravel applications easy to use.

v2.2.0(3mo ago)61979.4k↓14.5%58[19 issues](https://github.com/thedevdojo/auth/issues)[7 PRs](https://github.com/thedevdojo/auth/pulls)2MITBladePHP ^7.4|^8.0|^8.1|^8.2|^8.3|^8.4CI passing

Since Apr 25Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/thedevdojo/auth)[ Packagist](https://packagist.org/packages/devdojo/auth)[ Docs](https://github.com/devdojo/auth)[ RSS](/packages/devdojo-auth/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (19)Versions (41)Used By (2)

[![Auth Logo](https://camo.githubusercontent.com/3b3d5f439814ca619227f659774a15055d396c9c3831874c0207e919c67d60ba/68747470733a2f2f63646e2e646576646f6a6f2e636f6d2f696d616765732f617072696c323032342f64642d617574682d6c6f676f2e706e67)](https://devdojo.com)

[![Build Status](https://github.com/thedevdojo/auth/workflows/tests/badge.svg)](https://github.com/thedevdojo/auth/actions)[![Total Downloads](https://camo.githubusercontent.com/5aa4d52f9d47836e5d3efeb96179a904be42101b6232423b6ad5f2136cf4882b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646576646f6a6f2f61757468)](https://packagist.org/packages/devdojo/auth)[![Latest Stable Version](https://camo.githubusercontent.com/45dd9cb3e2b7690a2842629ee8ba6063f12350e5274e8d0593bf5c719e050dd3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646576646f6a6f2f61757468)](https://packagist.org/packages/devdojo/auth)[![License](https://camo.githubusercontent.com/99d293ce54d197abe9d9b9ed37d2383e2e75b04fc2ec69cdb16a649e1898de77/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f646576646f6a6f2f61757468)](https://packagist.org/packages/devdojo/auth)

About
-----

[](#about)

Auth is a plug'n play authentication package for any [Laravel application](https://laravel.com). 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: . Additionally, we are open to any kind of Pull Request 😉

[![](https://camo.githubusercontent.com/2a72ff2c495caf0bf44307740915e342442a2535d180396bac55a1e303c1771e/68747470733a2f2f63646e2e646576646f6a6f2e636f6d2f696d616765732f6a756e65323032342f646576646f6a6f2d617574682d696d6167652e706e67)](https://devdojo.com/auth)

Be sure to visit the official documentation at [](https://devdojo.com/auth/docs)

Installation
------------

[](#installation)

You can install this package into any new Laravel application, or any of the available [Laravel Starter Kits](https://devdojo.com/auth/docs/install).

```
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.
-----------------------------------------------

[](#optional-adding-the-hassocialproviders-trait)

You can add all the social auth helpers to your user model by including the following Trait:

```
