Coder Social home page Coder Social logo

filament-password-less's Introduction

Filament Password-less cover art

Password-less login for Filament

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Password-less authentication is the process of verifying a software user’s identity with something other than a password.

Screenshots

Screenshot of Login Screenshot of Passphrase expired Screenshot of Passphrase sent Screenshot of Passphrase re-sent

Installation

You can install the package via composer:

composer require artmin96/filament-password-less

Update the config/filament.php to point to the PasswordLess Login::class:

'auth' => [
    'guard' => env('FILAMENT_AUTH_GUARD', 'web'),
    'pages' => [
        'login' => \ArtMin96\FilamentPasswordLess\Http\Livewire\Auth\Login::class,
    ],
],

You can publish the config file with:

php artisan vendor:publish --tag="filament-password-less-config"

This is the contents of the published config file:

return [
    /**
     * Magic link
     *
     * Maybe you want to log in with a temporary generated link.
     * If yes, set it to true.
     */
    'using_magic_link' => false,

    /**
     * Rate limit count
     */
    'rate_limit_count' => 5,

    /**
     * Passphrase count
     *
     * Passphrase is a combination of 3 or 4 words separated by hyphens.
     */
    'passphrase_count' => 3,

    /**
     * Passphrase expiry (minutes)
     */
    'passphrase_expiry' => 15,

    /**
     * User model
     */
    'user_model' => \App\Models\User::class,

    /**
     * Login confirmation page component
     *
     * If you want to change something, place your component here.
     */
    'confirm_passphrase_component' => \ArtMin96\FilamentPasswordLess\Http\Livewire\Auth\Confirm::class,
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-password-less-views"

Usage

Add the ArtMin96\FilamentPasswordLess\Traits\PasswordLessLogin trait to your User model(s):

use Illuminate\Foundation\Auth\User as Authenticatable;
use ArtMin96\FilamentPasswordLess\Traits\PasswordLessLogin;

class User extends Authenticatable
{
    use PasswordLessLogin;

    // ...
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.