1. Go to this page and download the library: Download laswitchtech/php-auth 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/ */
laswitchtech / php-auth example snippets
// Initiate Session
session_start();
// These must be at the top of your script, not inside a function
use LaswitchTech\phpAUTH\phpAUTH;
// Load Composer's autoloader
// Generate a GDPR/CCPA Compliance HTML Form with Bootstrap 5
$phpAUTH->Compliance->form()
// Check if we can access through a specific hostname
$phpAUTH->Authorization->isAuthorized()
// Check if a User has a specific permission
$phpAUTH->Authorization->hasPermission($Name, $Level)
// Check if a User was authenticated
$phpAUTH->Authentication->isAuthenticated()
// Check if 2FA Request is ready
$phpAUTH->Authentication->is2FAReady()
// Check if email is verified
$phpAUTH->Authentication->isVerified()