This package can create a QRCode as Google, Microsoft two authentification factor using Google authenticator on IOS and Android, or Microsoft Authenticator for Windows Phone.
- Version: 1.0 alpha
- License: MIT License
- Author: Dryusdan
- Author of OTP: [Christian Riesen] (https://github.com/ChristianRiesen/otp)
- Author of Base32: [Christian Riesen] (https://github.com/ChristianRiesen/base32)
This is an alpha test, it's stable but comments are missing and some small functions. Sorry
You can simply download the package and extract it into fuel/packages/totp
folder or you can go under your fuel/packages
folder and run this command:
$ git clone https://github.com/Dryusdan/fuelphp-TOTP
You need to create an member area. When it's ok, you need create database for this package. Run command
php oil refine migrate --packages=totp
for create table.
For create member, you need: id of member, email of member.
<?php
$addUsers = Totp::addUser('1', '[email protected]');
$QRCode = Totp::generateQrCode('[email protected]', $addUsers);
?>
<img src="<?php echo $QRCode; ?>" />
<?php
$query = Totp::checkToken('[email protected]', '303011');
if($query == '1'){
echo 'access';
}
else{
echo 'wrong key';
}
?>
This is an alpha test andlater comes later. :)