function mo_auth_create_form in Google Authenticator / 2 Factor Authentication - 2FA 7
Same name in this branch
- 7 configure_qrcode_authentication.inc \mo_auth_create_form()
- 7 configure_kba.inc \mo_auth_create_form()
- 7 configure_google_authenticator.inc \mo_auth_create_form()
- 7 test_kba_authentication.inc \mo_auth_create_form()
4 calls to mo_auth_create_form()
- mo_auth_configure_google_authenticator in ./
configure_google_authenticator.inc - mo_auth_configure_kba in ./
configure_kba.inc - mo_auth_configure_qrcode_authentication in ./
configure_qrcode_authentication.inc - mo_auth_test_kba_authentication in ./
test_kba_authentication.inc - Menu callback for email verification.
File
- ./
configure_qrcode_authentication.inc, line 139
Code
function mo_auth_create_form($base_url, $qrCode) {
$androidAppLink = file_create_url($base_url . '/' . drupal_get_path('module', 'mo_auth') . '/includes/images/android-google-authenticator-app-link.png');
$iPhoneAppLink = file_create_url($base_url . '/' . drupal_get_path('module', 'mo_auth') . '/includes/images/iphone-google-authenticator-app-link.png');
$androidAppQR = file_create_url($base_url . '/' . drupal_get_path('module', 'mo_auth') . '/includes/images/android-mo-authenticator-app-qr.jpg');
$iPhoneAppQR = file_create_url($base_url . '/' . drupal_get_path('module', 'mo_auth') . '/includes/images/iphone-mo-authenticator-app-qr.png');
$step1 = '<div>
<div class="mo2f_googleauth-steps"><b>Step 1:</b> Download & Install the miniOrange Authenticator app.</div>
<div style="margin-bottom:20px;">
<div style="width:50%;float:left;">
<div class="mo2f_googleauth-download-manual">
<div class="mo2f_googleauth-download-header">Manual Installation</div>
<div>
<div style="font-size:1.1em;padding:10px;">iPhone Users</div>
<div>
<div style="width:60%;float:left">
<ul>
<li>Go to App Store.</li>
<li>Search for miniOrange.</li>
<li>Download and install the app. <b>(NOT MOAuth)</b></li>
</ul>
</div>
<div style="width:40%;float:left;">
<a target="_blank" href="https://apps.apple.com/app/id1482362759"><img src="' . $iPhoneAppLink . '"></a>
</div>
</div>
<br><br><br>
<div style="font-size:1.1em;padding:10px;">Android Users</div>
<div>
<div style="width:60%;float:left;">
<ul>
<li>Go to Google Play Store.</li>
<li>Search for miniOrange.</li>
<li>Download and install <span style="color: #F78701;"><b> Authenticator</b></span> app (<b>NOT miniOrange Authenticator/MOAuth)</b></li>
</ul>
</div>
<div style="width:40%;float:left;">
<a target="_blank" href="https://play.google.com/store/apps/details?id=com.miniorange.android.authenticator"><img src="' . $androidAppLink . '"></a>
</div>
</div>
</div>
</div>
</div>
<div style="width:50%;float:left;">
<div class="mo2f_googleauth-download-qrcode">
<div class="mo2f_googleauth-download-header">Scan QR Code</div>
<div style="text-align:center;padding:25px;">
<div style="width:50%;float:left">
<div>
<img src="' . $iPhoneAppQR . '">
</div>
<span>Apple App Store<br />(iOS)</span>
</div>
<div style="width:50%;float:left">
<div>
<img src="' . $androidAppQR . '">
</div>
<span>Google Play Store<br />(Android)</span>
</div>
</div>
</div>
</div>
</div>
</div>';
$step2 = '<div style="width: 100%;float:left;padding-top: 10px;">
<div class="mo2f_googleauth-steps"><b>Step 2:</b> Scan the below QR Code from miniOrange Authenticator app.</div>
<div style="text-align:center">
<div style="display:inline-block;width:33%">
<img src="data:image/jpg;base64,' . $qrCode . '">
</div>
<!--<div style="vertical-align: top;display: inline-flex;padding: 75px 0px;">
<p style="margin: auto 10px;">OR</p>
</div>
<div style="display:inline-block;width:33%">
<div class="mo2f_googleauth-secret">
<span style="padding:10px;">
<p style="font-size: 10pt;">Use the following secret</p><p>
</p><p id="googleAuthSecret" style="font-size: 13pt; font-weight: bold"></p>
<p style="font-size: 9pt;">(Spaces don't matter)</p><p>
</p></span></div>
</div>-->
</div>
</div>';
$step3 = '<div style="width: 100%;float:left;padding-top: 10px;">
<div class="mo2f_googleauth-steps"><b>Step 3:</b> Enter the Passcode generated by Google Authenticator app.</div>
</div>';
return $step1 . $step2;
}