PHPackages                             awema-pl/module-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. awema-pl/module-auth

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

awema-pl/module-auth
====================

Laravel Authentication package with built-in two-factor (Authy) and social authentication (Socialite).

v1.0.18(5y ago)04414MITPHP

Since Nov 23Pushed 4y ago1 watchersCompare

[ Source](https://github.com/awema-pl/module-auth)[ Packagist](https://packagist.org/packages/awema-pl/module-auth)[ Docs](https://github.com/awema-pl/module-auth)[ Fund](https://opencollective.com/awema)[ Patreon](https://www.patreon.com/awema)[ RSS](/packages/awema-pl-module-auth/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (5)Versions (20)Used By (14)

 [ ![Awema.pl logo](/assets/awema-pl/auth/img/promo/Logo_sign_color.svg) ](https://www.awema.pl/?utm_source=github&utm_medium=auth)

Authentication
==============

[](#authentication)

Laravel Authentication package with built-in two-factor (Authy) and social authentication (Socialite).

 [ ![Coverage report](https://camo.githubusercontent.com/769463ce696aedd213a2aef1c6a42a95feb0a06d61e1a44d4c44b553d8160ec2/68747470733a2f2f7265706f2e6177656d612e706c2f344742574f2f6177656d612d706c2f6d6f64756c652d617574682f696d672f6261646765732f6d61737465722f636f7665726167652e737667) ](https://www.awema.pl/?utm_source=github&utm_medium=shields) [ ![Last version](https://camo.githubusercontent.com/19be6c90c6fb14b8c3c615bc575895f8d24ffd33d749d0c895098b8efd1ea7a0/68747470733a2f2f7777772e6177656d612e706c2f344742574f2f6177656d612d706c2f6d6f64756c652d617574682f76657273696f6e2e737667) ](https://www.awema.pl/?utm_source=github&utm_medium=shields) [ ![Build status](https://camo.githubusercontent.com/886a17d0ae00222ee318b40c35bb0d76b44b6a59f7586e32eb2295e51b07302a/68747470733a2f2f7265706f2e6177656d612e706c2f344742574f2f6177656d612d706c2f6d6f64756c652d617574682f696d672f6261646765732f6d61737465722f6275696c642e737667) ](https://www.awema.pl/?utm_source=github&utm_medium=shields) [ ![Downloads](https://camo.githubusercontent.com/133704c4be808a9fbb2b74d6f1d40666ec1549cc497b3fa359dea57a2f16e4b3/68747470733a2f2f7777772e6177656d612e706c2f344742574f2f6177656d612d706c2f6d6f64756c652d617574682f646f776e6c6f6164732e737667) ](https://www.awema.pl/?utm_source=github&utm_medium=shields) [ ![License](https://camo.githubusercontent.com/2d86b8a35ca1a0703b520ec4e39018f6c9b19e5bc01440fc039728c880de3aea/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6177656d612d706c2f6d6f64756c652d617574682e737667) ](https://www.awema.pl/?utm_source=github&utm_medium=shields) [ ![CDN Ready](https://camo.githubusercontent.com/1fcb233c929ccc8331e462d9b428b88a893853130ba35738c8f8a8328e23fb6d/68747470733a2f2f7777772e6177656d612e706c2f344742574f2f6177656d612d706c2f6d6f64756c652d617574682f7374617475732e737667) ](https://www.awema.pl/?utm_source=github&utm_medium=shields) [ ![laravel](/assets/awema-pl/auth/img/badges/laravel.svg) ](https://www.awema.pl/?utm_source=github&utm_medium=shields) [ ![Last commit](https://camo.githubusercontent.com/3c557bbb0cc3abfcf9da1d293bc4a6a211af4422dbb5ea662bff62e8bbd405f3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6177656d612d706c2f6d6f64756c652d617574682e737667) ](https://www.awema.pl/?utm_source=github&utm_medium=shields) [ ![Analytics](https://camo.githubusercontent.com/1b05474ecf84f7bbe4fb683a54cdc4b3c14a8da8fbf69a2751fc4f45c715c7a6/68747470733a2f2f67612d626561636f6e2e61707073706f742e636f6d2f55412d3133343433313633362d312f6177656d612d706c2f6d6f64756c652d61757468) ](https://github.com/awema-pl/awema-pl) [ ![Hosted by Package Kit](https://camo.githubusercontent.com/49e48d1673493f772d8b4552bbb34a98d109710a26e9a429e7255319b728233c/68747470733a2f2f7777772e6177656d612e706c2f6261646765732f686f737465642e737667) ](https://www.awema.pl/?utm_source=github&utm_medium=shields) [ ![Patreon](/assets/awema-pl/auth/img/badges/patreon.svg) ](https://www.patreon.com/join/awemadotio)

 [![Laravel Authentication](/assets/awema-pl/auth/img/github/auth-cover.gif "Awema.pl Authentication")](/assets/awema-pl/auth/img/github/auth-cover.gif)

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Configuration](#configuration)
    - [Social and two-factor authentication](#social-and-two-factor-authentication)
    - [Email verification &amp; resetting passwords](#email-verification-resetting-passwords)
- [Usage](#usage)
- [Testing](#testing)

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

[](#installation)

Via Composer

```
$ composer require awema-pl/module-auth
```

The package will automatically register itself.

You can publish migrations:

```
php artisan vendor:publish --provider="AwemaPL\Auth\AuthServiceProvider" --tag="migrations"
```

After migrations have been published you can create required db tables by running:

```
php artisan migrate
```

Publish views:

```
php artisan vendor:publish --provider="AwemaPL\Auth\AuthServiceProvider" --tag="views"
```

Configuration
-------------

[](#configuration)

Publish config file:

```
php artisan vendor:publish --provider="AwemaPL\Auth\AuthServiceProvider" --tag="config"
```

You can disable additional features by commenting them out:

```
'enabled' => [
    'social',
    // 'two_factor',
    // 'email_verification',
],
```

Add new socialite services:

```
'services' => [
    'github' => [
        'name' => 'GitHub'
    ],
    ...
],
'github' => [
    'client_id' => env('GITHUB_CLIENT_ID'),
    ...
],
```

And configure redirect paths:

```
'redirects' => [
    'login' => '/twofactor',
    'reset_password' => '/',
    ...
],
```

### Social and two-factor authentication

[](#social-and-two-factor-authentication)

Several .env variables required if additional modules were enabled in config:

```
# SOCIALITE GITHUB
GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_REDIRECT_URL=http://auth.test/login/github/callback

# TWO FACTOR AUTHY
AUTHY_SECRET=
```

If you enabled social and/or two factor authentication add respective traits to User model class:

```
use AwemaPL\Auth\Models\Traits\HasSocialAuthentication;
use AwemaPL\Auth\Models\Traits\HasTwoFactorAuthentication;

class User extends Authenticatable
{
    use HasSocialAuthentication, HasTwoFactorAuthentication;
}
```

### Email verification &amp; resetting passwords

[](#email-verification--resetting-passwords)

To use email verification functionality and to reset passwords, add `SendsEmailVerification` and `SendsPasswordReset` traits:

```
use AwemaPL\Auth\Models\Traits\SendsPasswordReset;
use AwemaPL\Auth\Models\Traits\SendsEmailVerification;

class User extends Authenticatable
{
    use SendsEmailVerification, SendsPasswordReset;
}
```

Usage
-----

[](#usage)

Add to routes/web.php:

```
AwemaAuth::routes();
```

You can disable registration:

```
AwemaAuth::routes(['register' => false]);
```

Package will register several routes.

##### Besides default authentication routes, it will add:

[](#besides-default-authentication-routes-it-will-add)

- Socialite routes
    - `'login.social'`
    - `'login/{service}/callback'`
- Two factor authentication setup routes
    - `'twofactor.index'`
    - `'twofactor.store'`
    - `'twofactor.destroy'`
    - `'twofactor.verify'`
- Two factor authentication login routes
    - `'login.twofactor.index'`
    - `'login.twofactor.verify'`
- Email verification routes
    - `'verification.resend'`
    - `'verification.code.verify'`
    - `'verification.code'`
    - `'verification.verify'`

Testing
-------

[](#testing)

You can run the tests with:

```
composer test
```

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Credits
-------

[](#credits)

- [Galymzhan Begimov](https://github.com/begimov)
- [All Contributors](contributing.md)

License
-------

[](#license)

[MIT](http://opensource.org/licenses/MIT)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

19

Last Release

1971d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/68942388?v=4)[Awema](/maintainers/awema-pl)[@awema-pl](https://github.com/awema-pl)

---

Top Contributors

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

---

Tags

laravelauthAuthentication2faTwo Factor Authenticationsocialiteauthorizationauthorisationregistrationauthy

### Embed Badge

![Health badge](/badges/awema-pl-module-auth/health.svg)

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

###  Alternatives

[awes-io/auth

Laravel Authentication package with built-in two-factor (Authy) and social authentication (Socialite).

3826.7k1](/packages/awes-io-auth)[ellaisys/aws-cognito

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

120220.7k1](/packages/ellaisys-aws-cognito)[auth0/login

Auth0 Laravel SDK. Straight-forward and tested methods for implementing authentication, and accessing Auth0's Management API endpoints.

2745.0M3](/packages/auth0-login)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6712.1k2](/packages/hasinhayder-tyro)[rinvex/laravel-authy

Rinvex Authy is a simple wrapper for Authy TOTP, the best rated Two-Factor Authentication service for consumers, simplest 2fa Rest API for developers and a strong authentication platform for the enterprise.

3376.7k1](/packages/rinvex-laravel-authy)[chervand/yii2-oauth2-server

OAuth 2.0 server for Yii 2.0 with MAC tokens support.

1524.2k1](/packages/chervand-yii2-oauth2-server)

PHPackages © 2026

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