PHPackages                             escolalms/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. escolalms/auth

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

escolalms/auth
==============

Escola Headless LMS Authorization

0.2.39(1y ago)2174.8k↓32.8%20MITPHPPHP &gt;=7.4 | &gt;=8.0

Since Mar 10Pushed 1y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (13)Versions (151)Used By (20)

Auth
====

[](#auth)

[![swagger](https://camo.githubusercontent.com/bf46f50926ef796b1bb0b6e41af746af52ff3aacdffb0533450f3b614a7334a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d737761676765722d677265656e)](https://escolalms.github.io/Auth/)[![codecov](https://camo.githubusercontent.com/73e1e56e476b54916e8d26fd10bbf8ace6d2b5aabc8bd6435f239523fcf35f7e/68747470733a2f2f636f6465636f762e696f2f67682f4573636f6c614c4d532f417574682f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d4f393146484e4b493652)](https://codecov.io/gh/EscolaLMS/Auth)[![phpunit](https://github.com/EscolaLMS/Auth/actions/workflows/test.yml/badge.svg)](https://github.com/EscolaLMS/Core/actions/workflows/test.yml)[![downloads](https://camo.githubusercontent.com/348a2021ad265fda3aa66201a7c4159abf55bd077c68482103fa38799421ebfc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6573636f6c616c6d732f61757468)](https://packagist.org/packages/escolalms/auth)[![downloads](https://camo.githubusercontent.com/67d494556b981c743dc52ad77f1171c3a558a90f33519062cfb4afe52a678572/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6573636f6c616c6d732f61757468)](https://packagist.org/packages/escolalms/auth)[![downloads](https://camo.githubusercontent.com/9d790338d006901f0c9132b4cbe57739944f0bd8ba490a32f2378b90ecc081fc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6573636f6c616c6d732f61757468)](https://packagist.org/packages/escolalms/auth)[![Maintainability](https://camo.githubusercontent.com/36270863966f8a465d94633940d0465ef7391a52a85730e23f31be83432544f7/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62386466313336326432633933363365366536652f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/EscolaLMS/Auth/maintainability)[![Mutation testing badge](https://camo.githubusercontent.com/b2962aea2e0d02e749899107fa2cee7c992a079fccc40abd66c27f0920b0a73e/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f7374796c653d666c61742675726c3d687474707325334125324625324662616467652d6170692e737472796b65722d6d757461746f722e696f2532466769746875622e636f6d2532464573636f6c614c4d53253246417574682532466d61696e)](https://dashboard.stryker-mutator.io/reports/github.com/EscolaLMS/Auth/main)

What does it do
---------------

[](#what-does-it-do)

Package for user authentication. In addition, the package includes:

- user management,
- group management,
- profile management,
- registration.

Installing
----------

[](#installing)

- `composer require escolalms/auth`
- `php artisan migrate`
- `php artisan db:seed --class="EscolaLms\Auth\Database\Seeders\AuthPermissionSeeder"`

Optional:

- Run command `escolalms:admin`.

Commands
--------

[](#commands)

- `escolalms:admin` - create account with role admin

Database
--------

[](#database)

1. `category_user` - Table is used to store the user categories.
2. `groups` - Table for storing groups.
3. `group_user` - Table for storing groups assigned to the user.

```
User 1 -> n Categories
User 1 -> n Groups

```

Endpoints
---------

[](#endpoints)

All the endpoints are defined in [![swagger](https://camo.githubusercontent.com/bf46f50926ef796b1bb0b6e41af746af52ff3aacdffb0533450f3b614a7334a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646f63756d656e746174696f6e2d737761676765722d677265656e)](https://escolalms.github.io/Auth/)

Tests
-----

[](#tests)

Run `./vendor/bin/phpunit` to run tests. [![phpunit](https://github.com/EscolaLMS/Auth/actions/workflows/test.yml/badge.svg)](https://github.com/EscolaLMS/Core/actions/workflows/test.yml)[![codecov](https://camo.githubusercontent.com/73e1e56e476b54916e8d26fd10bbf8ace6d2b5aabc8bd6435f239523fcf35f7e/68747470733a2f2f636f6465636f762e696f2f67682f4573636f6c614c4d532f417574682f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d4f393146484e4b493652)](https://codecov.io/gh/EscolaLMS/Auth)

Events
------

[](#events)

- `AccountBlocked` - Event is dispatched after blocking the user's account (`is_active=false`).
- `AccountConfirmed` - Event is dispatched after the user verifies the account.
- `AccountDeleted` - Event is dispatched after deleting the user.
- `AccountMustBeEnableByAdmin` - Event is dispatched when the user registers and `Config::get('escola_auth.account_must_be_enabled_by_admin') === SettingStatusEnum::ENABLED`
- `AccountRegistered` - Event is dispatched after the account is registered.
- `ForgotPassword` - Event is dispatched when a password reset request is sent.
- `Login` - Event is dispatched on successful login.
- `Logout` - Event is dispatched after logout.
- `PasswordChanged` - Event is dispatched after the password changed.
- `ResetPassword` - Event is dispatched after resetting the password.
- `UserAddedToGroup` - Event is dispatched after adding the user to the group.
- `UserRemovedFromGroup` - Event is dispatched after removing the user from the group.

Listeners
---------

[](#listeners)

- `CreatePasswordResetToken` - The listener listens for the ForgotPassword event and executes the following method.

```
public function handle(ForgotPassword $event): void
{
    if (!is_callable(self::getRunEventForgotPassword()) || self::getRunEventForgotPassword()()) {
        $user = $event->getUser();

        $this->userRepository->update([
            'password_reset_token' => Str::random(32),
        ], $user->getKey());

        $user->refresh();

        $user->notify(new ResetPassword($user->password_reset_token, $event->getReturnUrl()));
    }
}
```

This is useful if you are using [TemplateEmail](https://github.com/EscolaLMS/Templates-Email) and you don't want to send the default e-mails.

```
 CreatePasswordResetToken::setRunEventForgotPassword(
    function () {
        $templateRepository = app(TemplateRepositoryContract::class);
        return empty($templateRepository->findTemplateDefault(
            ForgotPassword::class,
            EmailChannel::class
        ));
    }
 );
```

- `SendEmailVerificationNotification` - The listener listens for the AccountRegistered event and executes the following method.

```
public function handle(Registered $event)
{
    if (!is_callable(self::getRunEventEmailVerification()) || self::getRunEventEmailVerification()()) {
        if ($event->user instanceof MustVerifyEmail && !$event->user->hasVerifiedEmail()) {
            $event->user->sendEmailVerificationNotification();
        }
    }
}
```

How to use this on frontend
---------------------------

[](#how-to-use-this-on-frontend)

### Admin panel

[](#admin-panel)

**List of users**[![List of users](docs/list_of_users.png "List of users")](docs/list_of_users.png)

**Creating/editing user**[![Creating/editing user](docs/user_form.png "User form")](docs/user_form.png)

**User categories**[![User categories](docs/user_categories.png "User categories")](docs/user_categories.png)

**List of groups**[![List of groups](docs/list_of_groups.png "List of groups")](docs/list_of_groups.png)

**Creating/editing group**[![Creating/editing group](docs/group_form.png "Creating/editing group")](docs/group_form.png)

**My profile**[![My profile](docs/my_profile.png "My profile")](docs/my_profile.png)

Permissions
-----------

[](#permissions)

Permissions are defined in [seeder](database/seeders/AuthPermissionSeeder.php).

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community29

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~8 days

Recently: every ~65 days

Total

146

Last Release

671d ago

PHP version history (2 changes)0.1PHP ^7.4

v0.0.6PHP &gt;=7.4 | &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/76b9f62c3cf6603a01880fff42fd6579cdb859da0cbaa81f9aabea0d3d399d26?d=identicon)[mwl91](/maintainers/mwl91)

---

Top Contributors

[![qunabu](https://avatars.githubusercontent.com/u/214608?v=4)](https://github.com/qunabu "qunabu (68 commits)")[![pa-cholek](https://avatars.githubusercontent.com/u/5345420?v=4)](https://github.com/pa-cholek "pa-cholek (60 commits)")[![MWL91](https://avatars.githubusercontent.com/u/3055903?v=4)](https://github.com/MWL91 "MWL91 (47 commits)")[![mako321](https://avatars.githubusercontent.com/u/59456825?v=4)](https://github.com/mako321 "mako321 (42 commits)")[![daVitekPL](https://avatars.githubusercontent.com/u/58150098?v=4)](https://github.com/daVitekPL "daVitekPL (34 commits)")[![dyfero](https://avatars.githubusercontent.com/u/59400506?v=4)](https://github.com/dyfero "dyfero (11 commits)")[![dicani0](https://avatars.githubusercontent.com/u/58490533?v=4)](https://github.com/dicani0 "dicani0 (10 commits)")[![HerbertIV](https://avatars.githubusercontent.com/u/62691459?v=4)](https://github.com/HerbertIV "HerbertIV (9 commits)")[![KrzysztofDziedziechEscolasoft](https://avatars.githubusercontent.com/u/96292232?v=4)](https://github.com/KrzysztofDziedziechEscolasoft "KrzysztofDziedziechEscolasoft (5 commits)")[![victazzz](https://avatars.githubusercontent.com/u/24989821?v=4)](https://github.com/victazzz "victazzz (3 commits)")[![ArtKob](https://avatars.githubusercontent.com/u/108077902?v=4)](https://github.com/ArtKob "ArtKob (1 commits)")

---

Tags

headlesslaravellms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/escolalms-auth/health.svg)

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

###  Alternatives

[eveseat/web

SeAT Web Interface

2723.2k135](/packages/eveseat-web)[acacha/laravel-social

Social Login/Register implementation using Laravel Socialite and AdminLTE Laravel package

425.8k1](/packages/acacha-laravel-social)[regulus/identify

A Laravel 5 authentication/authorization package that adds roles, permissions, access levels, and user states. Allows simple or complex user access control implementation.

174.7k1](/packages/regulus-identify)

PHPackages © 2026

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