minhk/filament-login-multiauth

Login With Email Or Username (In One Field)

v1.0.3 2024-05-12 12:44 UTC

This package is auto-updated.

Last update: 2024-06-12 13:03:20 UTC


README

Filament Login MultiAuth

Filament Login MultiAuth

Latest Version on Packagist

Login With Email Or Username (In One Field)

Installation

You can install the package via composer:

composer require minhk/filament-login-multiauth 

This is the contents of the published config file:

return [
    'table_name' => 'users',
    'username_column' => 'username',
    'model' => 'App\\Models\\User',
];

You can publish the config file with:

php artisan vendor:publish --tag="filament-login-multiauth-config"

If you don't have a username column in users' table, you can publish the migration file and migrate it:

php artisan vendor:publish --tag="filament-login-multiauth-migrations"
php artisan migrate

If you want to generate username by email, you can run command:

php artisan generate:username --all-user=true

or 

php artisan generate:username your-email@email.com

Usage

Register the Minhk\FilamentLoginMultiauth\FilamentLoginMultiauthServiceProvider plugin in the panel provider file.

use Minhk\FilamentLoginMultiAuth\LoginMultiAuthPlugin;


public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            LoginMultiAuthPlugin::make(),
        ]);
}

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.