laranex / laravel-biometric-auth
A laravel package to provide asymmetric biometric authentication
Installs: 1 471
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 0
Forks: 3
Open Issues: 2
Requires
- php: ^7.0|^8.0
- illuminate/contracts: ^5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.8
- pestphp/pest: ^2.20
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
This package is auto-updated.
Last update: 2024-11-30 08:24:39 UTC
README
openssl 3.0^ is required to work with keys from iOS
IMPORTANT: 1.x is for laravel version between ^5.8.x and 9.x Please upgrade to the 2.x to use with laravel 10.x.
Installation
You can install the package via composer:
composer require laranex/laravel-biometric-auth
You can publish and run the migrations with:
php artisan vendor:publish --tag="biometric-auth-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="biometric-auth-config"
This is the contents of the published config file:
return [ 'table' => env('BIOMETRIC_AUTH_TABLE', 'biometrics'), 'signature_algorithm' => env('BIOMETRIC_AUTH_ALGORITHM', OPENSSL_ALGO_SHA256), ];
Usage
// Use Laranex\LaravelBiometricAuth\Traits\HasBiometrics in your Authenticable Model such as User, Admin class User extends Authenticatable { use Laranex\LaravelBiometricAuth\Traits\HasBiometrics; } // Register a new biometric $user->createBiometric("Public Key in base 64 format, not PEM format"); // Create a challenge for biometric authentication $biometric = Laranex\LaravelBiometricAuth\Facades\LaravelBiometricAuth::getBiometric("UUID of a biometric"); // Get the authenticable instance $biometric->instance // Verify the signature Laranex\LaravelBiometricAuth\Facades\LaravelBiometricAuth::verifyBiometric("UUID of a biometric", "Signature"); // Revoke a biometric $user->revokeBiometric("UUID of a biometric");
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.