PHP code example of comes / simpleauthenticator

1. Go to this page and download the library: Download comes/simpleauthenticator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

comes / simpleauthenticator example snippets


use Comes\SimpleAuthenticator\SimpleAuthenticator;

$secret = 'YOUR_SECRET_KEY';
$authenticator = new SimpleAuthenticator;
$oneTimePassword = $authenticator->generate($secret);
bash
php artisan vendor:publish --provider="Comes\SimpleAuthenticator\SimpleAuthenticatorServiceProvider" --tag="config"
bash
php artisan otp app-name