PHPackages                             ikepu-tp/laravel-secure-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. ikepu-tp/laravel-secure-auth

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

ikepu-tp/laravel-secure-auth
============================

v1.3.0(2y ago)06[2 issues](https://github.com/ikepu-tp/laravel-secure-auth/issues)MITPHPPHP ^8.2CI failing

Since Jan 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ikepu-tp/laravel-secure-auth)[ Packagist](https://packagist.org/packages/ikepu-tp/laravel-secure-auth)[ Docs](https://ikepu-tp.com)[ GitHub Sponsors](https://github.com/ikepu-tp)[ RSS](/packages/ikepu-tp-laravel-secure-auth/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

Laravel Secure Auth
===================

[](#laravel-secure-auth)

This package adds more secure authentication in Laravel.

[Japanese](./README-ja.md)

Usage
-----

[](#usage)

### 1. install

[](#1-install)

```
composer require ikepu-tp/laravel-secure-auth
```

### 2. migration

[](#2-migration)

```
php artisan migrate
```

### 3. Configuration files

[](#3-configuration-files)

```
php artisan vendor:publish --tags=SecureAuth-config
```

Change the configuration as necessary.

key entriesdescriptionexpires\_minituestoken\_expires\_minutestoken\_digitsnumber of digits in tokenloginCallbackfunction of login processlogin\_historyWhether to record login history or notlogin\_emailsend an email which notify login### Two-factor authentication

[](#two-factor-authentication)

Important

Set up the login handling function in the `loginCallback` configuration file.

```
    /**
     * Handle an incoming authentication request.
     */
    public function store(LoginRequest $request): RedirectResponse
    {
        $user = User::query()
            ->where("email", $request->validated("email"))
            ->first();
        if (!$user || !Hash::check($request->validated("password"), $user->password)) throw new UnauthorizedException();
        return \ikepu_tp\SecureAuth\app\Http\Services\TfaService::make($user, $request->validated("remember", false));
    }

```

### Record Login History

[](#record-login-history)

Important

Issue a login event during the login process.

```
    public function login(User $user)
    {
        session()->regenerate();
        event(new \ikepu_tp\SecureAuth\app\Events\LoginEvent($user));
        \Illuminate\Support\Facades\Auth::guard($guard)->login($user, $remember);
    }
```

Contributtion
-------------

[](#contributtion)

We welcome contributions to the project! You can get involved through the following ways:

Issue: Use for bug reports, feature suggestions, and more. Pull Requests: We encourage code contributions for new features and bug fixes.

License
-------

[](#license)

See [LICENSE](./LICENSE).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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

Total

3

Last Release

778d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ac86e517a7246ddca22b5fff5a1842130dcc28e44516e388ca07109312eacac?d=identicon)[ikepu-tp](/maintainers/ikepu-tp)

---

Tags

laravel

### Embed Badge

![Health badge](/badges/ikepu-tp-laravel-secure-auth/health.svg)

```
[![Health](https://phpackages.com/badges/ikepu-tp-laravel-secure-auth/health.svg)](https://phpackages.com/packages/ikepu-tp-laravel-secure-auth)
```

###  Alternatives

[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k16.4M48](/packages/lab404-laravel-impersonate)[santigarcor/laratrust

This package provides a flexible way to add Role-based Permissions to Laravel

2.3k5.4M43](/packages/santigarcor-laratrust)[pragmarx/google2fa-laravel

A One Time Password Authentication package, compatible with Google Authenticator.

1.0k15.5M63](/packages/pragmarx-google2fa-laravel)[codegreencreative/laravel-samlidp

Make your PHP Laravel application an Identification Provider using SAML 2.0. This package allows you to implement your own Identification Provider (idP) using the SAML 2.0 standard to be used with supporting SAML 2.0 Service Providers (SP).

263763.5k1](/packages/codegreencreative-laravel-samlidp)[lab404/laravel-auth-checker

Laravel Auth Checker allows you to log users authentication, devices authenticated from and lock intrusions.

223164.9k2](/packages/lab404-laravel-auth-checker)[jeremy379/laravel-openid-connect

OpenID Connect support to the PHP League's OAuth2 Server. Compatible with Laravel Passport.

55342.3k2](/packages/jeremy379-laravel-openid-connect)

PHPackages © 2026

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