1. Go to this page and download the library: Download mortezamasumi/fb-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/ */
use Mortezamasumi\FbAuth\FbAuthPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugin(FbAuthPlugin::make());
}
use Mortezamasumi\FbAuth\Facades\FbAuth;
$code = FbAuth::createCode($user); // generates + caches a code for the user
$digits = FbAuth::generateRandomCode(); // random code using otp_digits/otp_expiration
echo FbAuth::encodeEmail('[email protected]'); // masked email, e.g. **st@**mp.**m
public function panel(Panel $panel): Panel
{
return $panel
->login()
->registration()
->passwordReset()
->emailVerification() //