libaro/miqey-client

A package to integrate MiQey into your application

v1.0.0 2024-04-17 13:46 UTC

This package is auto-updated.

Last update: 2024-04-26 13:38:59 UTC


README

Latest Version on Packagist Total Downloads

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.