Open Nav

Example Auth

We show how it works



Push Request

<?php
$authRequest->to('client@example.com')
            ->mode('push')
            ->response(false)
            ->send();

if (is_null($authRequest->isAccept())) {
             echo "Client answer timeout...";
             }

if ($authRequest->isAccept() == 'true') {
             echo "You are logged in...";
             }

if ($authRequest->isAccept() == 'true') {
             echo "Access denied!";
             }

Code Request

<?php
$req = $authRequest->to('client@example.com')
            ->mode('code')
            ->code('123456')
            ->send();

//Save $req (unique request hash) in your storage with code '123456'

if ($_REQUEST('client_code') == '123456') {
             echo "You are logged in...";
             }
else {
             echo "Access denied!";
             }

View tutorials for more...