PHPackages                             m1guelpf/laravel-fastlogin - 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. m1guelpf/laravel-fastlogin

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

m1guelpf/laravel-fastlogin
==========================

Allow your users to login with FaceID/TouchID

v2.2(3y ago)99618.0k↑18.1%84[14 issues](https://github.com/m1guelpf/laravel-fastlogin/issues)MITPHPPHP ^8.0

Since Jan 24Pushed 3y ago18 watchersCompare

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

READMEChangelog (8)Dependencies (9)Versions (9)Used By (0)

Allow your users to login with FaceID/TouchID
=============================================

[](#allow-your-users-to-login-with-faceidtouchid)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a49d57c08db7f4b4933aed469019919c72f73538d3d0a4c13a7204484af2aa1d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d316775656c70662f6c61726176656c2d666173746c6f67696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/m1guelpf/laravel-fastlogin)[![Total Downloads](https://camo.githubusercontent.com/4bb96a9eebc8ac8c82e82a3a966bc7548f03a62f11d3210a929613baf02bf708/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d316775656c70662f6c61726176656c2d666173746c6f67696e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/m1guelpf/laravel-fastlogin)

Allow your users to register physical authentication devices (FaceID or TouchID on iPhones &amp; macs, fingerprint on Android, Hello on Windows and USB keys) to skip entering their login credentials.

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

[](#installation)

You can install the package via composer:

```
composer require m1guelpf/laravel-fastlogin
```

You'll then need to add the `\M1guelpf\FastLogin\Models\Concerns\CanFastLogin` trait to your user model and migrate your database by running `php artisan migrate`.

```
class User extends Authenticatable
{
    use CanFastLogin;
}
```

Usage
-----

[](#usage)

This package takes care of everything you need on the backend. To make our life easier on the frontend, we'll be using `@web-auth/webauthn-helper` and `js-cookie`. You can install them by running `yarn add @web-auth/webauthn-helper js-cookie`.

To get started, you need to have the user register a new credential. You can do so by presenting them with a modal when they login, or by adding the option to their settings page.

> Note: Due to Apple's restrictions, you can only call the creation function after a user gesture, that is, the function needs to be invoked in an user-generated event (like a "click" event).

```
import Cookies from 'js-cookie'
import { useRegistration } from '@web-auth/webauthn-helper'

const onClick = () => {
    const token = Cookies.get('XSRF-TOKEN')

    useRegistration({
        actionUrl: route('fastlogin.create'),
        optionsUrl: route('fastlogin.create.details'),
        actionHeader: {
            'x-xsrf-token': token
        },
    }, {
        'x-xsrf-token': token
    })().then(() => {
        // credential has been added
    })
}
```

Then, on the login page, you should check if the user has a credential saved (you can do so by calling the `$request->hasCredential()` method) and, if so, displaying a button to sign in using FastLogin.

> Note: Due to Apple's restrictions, you can only call the login function after a user gesture, that is, the function needs to be invoked in an user-generated event (like a "click" event).

```
import Cookies from 'js-cookie'
import { useLogin } from '@web-auth/webauthn-helper'

const onClick = () => {
    const token = Cookies.get('XSRF-TOKEN')

    useLogin({
        actionUrl: route('fastlogin.login'),
        optionsUrl: route('fastlogin.login.details'),
        actionHeader: {
            'x-xsrf-token': token
        },
    }, {
        'x-xsrf-token': token
    })().then(() => {
        // the user has been logged in

        window.location.reload()
    })
}
```

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

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Miguel Piedrafita](https://github.com/m1guelpf)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity52

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor2

2 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 ~86 days

Recently: every ~129 days

Total

8

Last Release

1333d ago

Major Versions

v1.0.2 → v2.02021-04-22

PHP version history (3 changes)v1.0PHP ^8.0

v2.0PHP ^7.2.5|^8.0

v2.1PHP ^7.4|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/23558090?v=4)[Miguel Piedrafita](/maintainers/m1guelpf)[@m1guelpf](https://github.com/m1guelpf)

---

Top Contributors

[![m1guelpf](https://avatars.githubusercontent.com/u/23558090?v=4)](https://github.com/m1guelpf "m1guelpf (7 commits)")[![fredbradley](https://avatars.githubusercontent.com/u/1639226?v=4)](https://github.com/fredbradley "fredbradley (6 commits)")[![captenmasin](https://avatars.githubusercontent.com/u/25454872?v=4)](https://github.com/captenmasin "captenmasin (2 commits)")[![louisbels](https://avatars.githubusercontent.com/u/1326252?v=4)](https://github.com/louisbels "louisbels (2 commits)")[![LTKort](https://avatars.githubusercontent.com/u/2412670?v=4)](https://github.com/LTKort "LTKort (2 commits)")[![chrisrenga](https://avatars.githubusercontent.com/u/13778529?v=4)](https://github.com/chrisrenga "chrisrenga (1 commits)")[![Simoneu01](https://avatars.githubusercontent.com/u/43807696?v=4)](https://github.com/Simoneu01 "Simoneu01 (1 commits)")[![dirk-helbert](https://avatars.githubusercontent.com/u/1588675?v=4)](https://github.com/dirk-helbert "dirk-helbert (1 commits)")[![danclaytondev](https://avatars.githubusercontent.com/u/27310664?v=4)](https://github.com/danclaytondev "danclaytondev (1 commits)")

---

Tags

m1guelpflaravel-fastlogin

### Embed Badge

![Health badge](/badges/m1guelpf-laravel-fastlogin/health.svg)

```
[![Health](https://phpackages.com/badges/m1guelpf-laravel-fastlogin/health.svg)](https://phpackages.com/packages/m1guelpf-laravel-fastlogin)
```

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[spatie/laravel-export

Create a static site bundle from a Laravel app

646127.9k5](/packages/spatie-laravel-export)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[moonshine/moonshine

Laravel administration panel

1.3k217.1k59](/packages/moonshine-moonshine)

PHPackages © 2026

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