PHP code example of enzoaccardo / ci4-adminkit-mfa
1. Go to this page and download the library: Download enzoaccardo/ci4-adminkit-mfa 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/ */
enzoaccardo / ci4-adminkit-mfa example snippets
\AdminKit\Routing\Discovery::discover($routes, 'AdminKit\Mfa\Controllers');
if (service('mfa')->isRequired($user)) {
session()->set('mfa_pending', $user->mfa_secret ? 'verify' : 'setup');
return redirect()->to($user->mfa_secret ? '/mfa/verify' : '/mfa/setup');
}