libaro / miqey-client
A package to integrate MiQey into your application
Requires
- php: ^7.4|^8.0|^8.1|^8.2|^8.3
- ext-json: *
- jenssegers/agent: ^2.6
Requires (Dev)
- orchestra/testbench: ^6.0
- pestphp/pest: ^1.23
- pestphp/pest-plugin-laravel: ^1.4
- phpstan/phpstan: ^1.8
- phpunit/phpunit: ^9.0
This package is auto-updated.
Last update: 2024-04-26 13:38:59 UTC
README
The MiQey Client Laravel Package simplifies the integration of the MiQey functionality into your Laravel projects. MiQey is designed to facilitate a secure login procedure by generating sign requests, managing user responses through QR codes or SMS, and seamlessly logging users into your projects.
Installation
You can install the package via composer:
composer require libaro/miqey-client
Publish the config file:
php artisan vendor:publish --provider="Libaro\MiQey\MiQeyServiceProvider" --tag="config"
Usage
Add the following to your login page:
const pusherKey = 'your pusher key'; const subChannel = 'signRequest_{generated_code_from_MiQey}'; const authEndpoint = '/miqey/validate'; var pusher = new Pusher(pusherKey, { cluster: 'eu' }); var channel = pusher.subscribe(subChannel); channel.bind('sign-request-received', function (data) { window.location.href = authEndpoint + '?token=' + data.token });
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Security
If you discover any security related issues, please email github@libaro.be instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.