Adminer - OTP (2FA)

To require a One-time password (Two-factor authentication) for logging to Adminer:

  1. Scan this QR code to Google Authenticator or a similar application.
    QR code

  2. Upload login-otp.php into a directory named adminer-plugins/.

  3. Create this file:
    <?php // adminer-plugins.php
    return array(
    	new AdminerLoginOtp(base64_decode('TFBq8DOR4s3L+w==')),
    );
    

  4. The login form now should look like this:
    Adminer login form

  5. Enter the OTP generated by the app (6 digits). OTP is derived from the current time so it's important to have the correct time on the phone and on the server.

Customization

Issuer: Užívateľ:

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.