PHPackages                             sandrocagara/laravelmultiauth - 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. sandrocagara/laravelmultiauth

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

sandrocagara/laravelmultiauth
=============================

Native Laravel Multi-Authentication (Subscriber, Administrator, Super Administrator).

v1.0.8(5y ago)119MITHTML

Since May 10Pushed 5y ago1 watchersCompare

[ Source](https://github.com/sndrjhlncgr/Laravel-Native-Multi-Authentication-5.6)[ Packagist](https://packagist.org/packages/sandrocagara/laravelmultiauth)[ RSS](/packages/sandrocagara-laravelmultiauth/feed)WikiDiscussions master Synced today

READMEChangelog (3)DependenciesVersions (5)Used By (0)

Laravel Native Multi Authentication
===================================

[](#laravel-native-multi-authentication)

A Simple Native Laravel Package for handling multiple authentication.

 [![GitHub issues](https://camo.githubusercontent.com/a286fda2a39048c0f43ab6d43cf820323d79486be21b687d578011654f7c8215/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f736e64726a686c6e6367722f4c61726176656c2d4e61746976652d4d756c74692d41757468656e7469636174696f6e2d352e36)](https://github.com/sndrjhlncgr/Laravel-Native-Multi-Authentication-5.6/issues) [![GitHub forks](https://camo.githubusercontent.com/343cacf135b872e53457f78a3c11b70a719b726d53e45f2b4adae1e5880b7598/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f736e64726a686c6e6367722f4c61726176656c2d4e61746976652d4d756c74692d41757468656e7469636174696f6e2d352e36)](https://github.com/sndrjhlncgr/Laravel-Native-Multi-Authentication-5.6/network) [![GitHub stars](https://camo.githubusercontent.com/5b1289829926170a870996d2ea6d616166c14ce01c03f7c1597b46b7a52b72c4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f736e64726a686c6e6367722f4c61726176656c2d4e61746976652d4d756c74692d41757468656e7469636174696f6e2d352e36)](https://github.com/sndrjhlncgr/Laravel-Native-Multi-Authentication-5.6/stargazers) [![GitHub license](https://camo.githubusercontent.com/05107dd26dabd7bae37e1aa9925ed0c27a4e49ef676b152898e1175a70beef1d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f736e64726a686c6e6367722f4c61726176656c2d4e61746976652d4d756c74692d41757468656e7469636174696f6e2d352e36)](https://github.com/sndrjhlncgr/Laravel-Native-Multi-Authentication-5.6/blob/master/LICENSE)

[![Image of Sandro Cagara](https://camo.githubusercontent.com/2090f64b108d1ee10c747d1e01725a79dcd37f71f6cfa36ebb65d53c81689bb2/68747470733a2f2f692e6962622e636f2f577a6a514c48562f3638373437343730373333613266326636393265363936323632326536333666326635613536353136613337373735393266363437333631363436313634373332653730366536372e6a7067)](https://camo.githubusercontent.com/2090f64b108d1ee10c747d1e01725a79dcd37f71f6cfa36ebb65d53c81689bb2/68747470733a2f2f692e6962622e636f2f577a6a514c48562f3638373437343730373333613266326636393265363936323632326536333666326635613536353136613337373735393266363437333631363436313634373332653730366536372e6a7067)

Features
--------

[](#features)

Forgot passwordAccount Verification EmailChange Password✔️ Subscriber✔️ Subscriber✔️ Subscriber✔️ Administrator❌ Administrator✔️ Administrator✔️ Super Administrator❌ Super Administrator✔️ Super AdministratorCompatibility
-------------

[](#compatibility)

Laravel Framework&gt;= 5.0.x &lt;= 5.8.xInstalling and configuring
--------------------------

[](#installing-and-configuring)

Install using composer:
**Note:** before you install this you need make an default authentication using `php artisan make:auth` then delete `home.blade.php`.

```
$ composer require sandrocagara/laravelmultiauth
```

and you need to publish `[#]Sandrocagara\Multiauth\AuthServiceProvider`:

```
$ php artisan vendor:publish --force
```

Routes
------

[](#routes)

You need to copy/paste this in your `routes/web.php`.

```
Route::get('/', function () {
    return view('welcome');
});

Auth::routes();
Route::prefix('home')->group(function() {
    Route::get('/', 'HomeController@index')->name('home');

    Route::get('/change-password','HomeController@showChangePasswordForm')->name('home.change-password.form');
    Route::post('/change-password', 'HomeController@changePassword')->name('home.change-password.submit');

    Route::get('/logout', 'Auth\LoginController@userlogout')->name('home.logout');
});

Route::prefix('admin')->group(function() {
    Route::get('/login', 'Auth\AdminLoginController@showLoginForm')->name('admin.login.form');
    Route::post('/login', 'Auth\AdminLoginController@login')->name('admin.login.submit');

    Route::get('/', 'AdminHomeController@index')->name('admin.home');

    Route::get('/change-password','AdminHomeController@showChangePasswordForm')->name('admin.change-password.form');
    Route::post('/change-password','AdminHomeController@changePassword')->name('admin.change-password.submit');

    Route::get('/logout', 'Auth\AdminLoginController@logout')->name('admin.logout');

    Route::post('/password/email', 'Auth\AdminForgotPasswordController@sendResetLinkEmail')->name('admin.password.email');
    Route::get('/password/reset', 'Auth\AdminForgotPasswordController@showLinkRequestForm')->name('admin.password.request');
    Route::post('/password/reset', 'Auth\AdminResetPasswordController@reset')->name('admin.reset');
    Route::get('/password/reset/{token}', 'Auth\AdminResetPasswordController@showResetForm')->name('admin.password.reset');
});

Route::prefix('super-admin')->group(function() {
    Route::get('/login', 'Auth\SuperAdminLoginController@showLoginForm')->name('super-admin.login.form');
    Route::post('/login', 'Auth\SuperAdminLoginController@login')->name('super-admin.login.submit');

    Route::get('/', 'SuperAdminHomeController@index')->name('super-admin.home');

    Route::get('/change-password', 'SuperAdminHomeController@showChangePasswordForm')->name('super-admin.change-password.form');
    Route::post('/change-password', 'SuperAdminHomeController@changePassword')->name('super-admin.change-password.submit');

    Route::get('/logout', 'Auth\SuperAdminLoginController@superAdminlogout')->name('super-admin.logout');

    Route::post('/password/email', 'Auth\SuperAdminForgotPasswordController@sendResetLinkEmail')->name('super-admin.password.email');
    Route::get('/password/reset', 'Auth\SuperAdminForgotPasswordController@showLinkRequestForm')->name('super-admin.password.request');
    Route::post('/password/reset', 'Auth\SuperAdminResetPasswordController@reset')->name('super-admin.reset');
    Route::get('/password/reset/{token}', 'Auth\SuperAdminResetPasswordController@showResetForm')->name('super-admin.password.reset');
});

Route::prefix('account')->group(function() {
    Route::get('/user/verified/{token}', 'Auth\RegisterController@accountVerification');
});

Route::fallback(function(){
    return back();
});

```

Migration
---------

[](#migration)

Then after that you're ready to migrate.

```
php artisan migrate

```

Config
------

[](#config)

in `config/auth.php` the default expiration of reset password is `30mins`. you can change it by updating this array.

```
'passwords' => [
     'users' => [
         'provider' => 'users',
         'table' => 'password_resets',
         'expire' => 30,  [
         'provider' => 'admins',
         'table' => 'password_resets',
         'expire' => 30,  [
         'provider' => 'super_admins',
         'table' => 'password_resets',
         'expire' => 30, create();`
**Administrator:** `factory(App\Admin::class, 5)->create();`
**Super Administrator:** `factory(App\SuperAdmin::class, 5)->create();`

**Default Password:** `secret`

Common Issue you may Encounter
------------------------------

[](#common-issue-you-may-encounter)

**Error:** Expected response code 250 but got code "530", with message "530 5.7.1 Authentication required".
**Solution:** You need to setup your mail driver. for more info \[\]

---

**Error:** Object not found! when click reset password in email.
**Solution:** if you're using `php artisan serve` you need to change the `APP_URL` value from  to  in the env file.

---

**Error:** Trying to access array offset on value of type null. this type of error cause of php version so maybe you can upgrade the php version in your composer.json
**Solution:** try to update composer by this command: `composer update`

---

**Error:** “The page has expired due to inactivity”.
**Solution:** if youre using php artisan serve you need to change in env file the APP\_URL from  to

---

License
-------

[](#license)

MIT © 2020 [Sandro Cagara](https://github.com/sndrjhlncgr)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

4

Last Release

2173d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/824a950ea3cd10cdbcba24005b3c6b730b738fcff8973e32143d7eb1719858eb?d=identicon)[sndrjhlncgr](/maintainers/sndrjhlncgr)

---

Top Contributors

[![sndrjhlncgr](https://avatars.githubusercontent.com/u/51398549?v=4)](https://github.com/sndrjhlncgr "sndrjhlncgr (27 commits)")

---

Tags

authenticateauthenticationlaravellaravel-5-packagelaravelmultiauthlibrarymultimultiauthnative

### Embed Badge

![Health badge](/badges/sandrocagara-laravelmultiauth/health.svg)

```
[![Health](https://phpackages.com/badges/sandrocagara-laravelmultiauth/health.svg)](https://phpackages.com/packages/sandrocagara-laravelmultiauth)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
