To require a One-time password (Two-factor authentication) for logging to Adminer:
<?php
function adminer_object() {
include_once "./plugin.php";
include_once "./login-otp.php";
$plugins = array(
new AdminerLoginOtp(base64_decode('+rgPLmqHo5jyTg==')),
);
return new AdminerPlugin($plugins);
}
// store original adminer.php somewhere not accessible from web
include "../not-accessible-from-web/adminer.php";
Note: The unique secret was randomly generated on this server (and not stored anywhere). You might want to generate the secret and the QR code without using third-party, e.g. with a library or simple functions.