Title: Muzzamil Two-Step Login Security
Author: Muzzamil Ahmed Khan
Published: <strong>December 5, 2026</strong>
Last modified: December 5, 2026

---

Search plugins

![](https://ps.w.org/muzzamil-two-step-login-security/assets/icon-256x256.png?rev
=3845583)

# Muzzamil Two-Step Login Security

 By [Muzzamil Ahmed Khan](https://profiles.wordpress.org/muzzamilahmedkhan/)

[Download](https://downloads.wordpress.org/plugin/muzzamil-two-step-login-security.1.1.0.zip)

 * [Details](https://wordpress.org/plugins/muzzamil-two-step-login-security/#description)
 * [Reviews](https://wordpress.org/plugins/muzzamil-two-step-login-security/#reviews)
 *  [Installation](https://wordpress.org/plugins/muzzamil-two-step-login-security/#installation)
 * [Development](https://wordpress.org/plugins/muzzamil-two-step-login-security/#developers)

 [Support](https://wordpress.org/support/plugin/muzzamil-two-step-login-security/)

## Description

**Muzzamil Two-Step Login Security** adds strong, reliable two-factor authentication(
2FA) to WordPress. It works per-account and per-user — each person chooses when 
to opt in, and nothing is forced site-wide without configuration.

There are two ways to set it up:

**Option 1 — Automatic Setup (Recommended)**
 Connect your Google, Microsoft, or
Facebook account in one click. The site administrator configures the OAuth app once
in the settings; users never see any Client IDs or technical fields. After authorizing,
users verify a quick re-login with a single dedicated button, and two-step protection
is active immediately.

**Option 2 — Manual Setup (Authenticator App)**
 Scan a QR code with Google Authenticator,
Microsoft Authenticator, Authy, or any TOTP-compatible app, then confirm with a 
six-digit code. Backup one-time recovery codes are generated at setup.

**Key features:**

 * 🔒 AES-256-GCM encrypted secret storage, keyed to the site’s WordPress auth salt
 * 📱 Works with Google Authenticator, Microsoft Authenticator, Authy, and all TOTP
   apps
 * ☁️ One-click social sign-in 2FA with Google, Microsoft, or Facebook
 * 🔑 One-time recovery codes (stored as keyed hashes — never in plain text)
 * 🚦 Rate limiting on failed verification attempts with replay prevention
 * 🛡️ PKCE + browser-bound state cookies for all OAuth flows (Google, Microsoft)
 * 📵 QR codes are generated locally in the browser — no external servers contacted
   for TOTP
 * ⚡ Activation redirect: taken straight to the setup page the moment you activate
 * 🌐 Translation-ready with full `Text Domain` support

### External services

This plugin provides optional social authentication and two-step verification using
third-party OAuth 2.0 identity providers. The plugin communicates with these external
services exclusively when a site user explicitly clicks to connect an account or
sign in with that provider. No background telemetry or unsolicited requests are 
made.

The external services used are:

 1. **Google Identity Platform (Google OAuth 2.0)**
 2.  * **Purpose:** Enables users to authenticate their WordPress account using their
       Google identity as a two-step verification method.
     * **Endpoints accessed:**
        - `https://accounts.google.com/o/oauth2/v2/auth` (User consent and authorization)
        - `https://oauth2.googleapis.com/token` (Authorization code exchange for tokens)
        - `https://openidconnect.googleapis.com/v1/userinfo` (Retrieval of unique Google
          user ID)
     * **Data sent and when:** Transmitted only when a user explicitly clicks “Sign
       in with Google” or “Set up with Google”. The user is directed to Google to authenticate;
       after consent, an authorization code is sent to obtain the account’s unique 
       identifier.
     * **Terms of Service:** [Google Terms of Service](https://policies.google.com/terms)
     * **Privacy Policy:** [Google Privacy Policy](https://policies.google.com/privacy)
 3. **Microsoft Identity Platform (OAuth 2.0)**
 4.  * **Purpose:** Enables users to authenticate their WordPress account using their
       Microsoft identity as a two-step verification method.
     * **Endpoints accessed:**
        - `https://login.microsoftonline.com/common/oauth2/v2.0/authorize` (User consent
          and authorization)
        - `https://login.microsoftonline.com/common/oauth2/v2.0/token` (Authorization
          code exchange for tokens)
     * **Data sent and when:** Transmitted only when a user explicitly clicks “Sign
       in with Microsoft” or “Set up with Microsoft”. The authorization code is exchanged
       with Microsoft to retrieve the user’s unique Microsoft identifier.
     * **Terms of Service:** [Microsoft Services Agreement](https://www.microsoft.com/en/servicesagreement)
     * **Privacy Policy:** [Microsoft Privacy Statement](https://privacy.microsoft.com/privacystatement)
 5. **Meta / Facebook Login (OAuth 2.0)**
 6.  * **Purpose:** Enables users to authenticate their WordPress account using their
       Facebook identity as a two-step verification method.
     * **Endpoints accessed:**
        - `https://www.facebook.com/v26.0/dialog/oauth` (User consent and authorization)
        - `https://graph.facebook.com/v26.0/oauth/access_token` (Authorization code
          exchange for access token)
        - `https://graph.facebook.com/v26.0/me?fields=id` (Retrieval of unique Facebook
          user ID)
     * **Data sent and when:** Transmitted only when a user explicitly clicks “Sign
       in with Facebook” or “Set up with Facebook”. The authorization code is exchanged
       with Meta Graph API to verify the identity and retrieve the user’s account identifier.
     * **Terms of Service:** [Meta Terms of Service](https://www.facebook.com/terms.php)
     * **Privacy Policy:** [Meta Privacy Policy](https://www.facebook.com/privacy/policy)

### Privacy Policy

Muzzamil Two-Step Login Security prioritizes user privacy:

 * **Local TOTP Authentication:** TOTP secrets, keys, and recovery hashes are stored
   strictly in your local WordPress database using AES-256-GCM encryption. QR codes
   are generated locally inside the browser. No data is sent to external servers
   for TOTP functionality.
 * **Optional OAuth Verification:** When a user chooses to sign in or link their
   Google, Microsoft, or Facebook account, the plugin communicates directly with
   that provider solely to authenticate the user and obtain their unique provider
   subject identifier. Tokens are not retained after authentication.
 * **Brute-Force Rate Limiting:** Verification attempts and timestamps are tracked
   locally in user metadata to prevent brute-force attacks and are never shared.
 * **Zero Tracking:** The plugin does not collect tracking data, analytics, cookies
   for marketing, or telemetry.

### Support

Found a bug or need help? Please use the WordPress.org support forum for this plugin.

**Developer:** Muzzamil Ahmed Khan
 **Website:** https://muzzamilahmedkhan.site/
contact-me **Email:** muzzamil.wpdev@gmail.com **LinkedIn:** https://www.linkedin.
com/in/muzzamil-ahmed-khan/

## Installation

 1. Upload the `muzzamil-two-step-login-security` folder to `/wp-content/plugins/`,
    or install directly from the WordPress Plugin Directory.
 2. Activate **Muzzamil Two-Step Login Security**. You will be automatically redirected
    to the settings screen.
 3. Choose your preferred setup method:

**Automatic Setup (Google / Microsoft / Facebook)**

 * As an administrator, go to **Muzzamil Two-Step Security** > **Social Login Settings**
   to configure your OAuth app credentials once.
 * Users can then click **Setup with Google** (or Microsoft / Facebook) and authenticate
   with one click.

**Manual Setup (Authenticator App)**

 * Click **Setup with Authenticator App (Scan QR Code)**.
 * Open your TOTP app, scan the QR code, and enter the six-digit code shown.
 * Save your recovery codes somewhere safe.

 1. Two-step protection is now active on your account.

## FAQ

### Does every user have to set up 2FA?

No. Enrollment is voluntary per account. A site administrator can choose to enroll
their own account without affecting other users.

### Which authenticator apps are supported?

Any app that supports standard TOTP: Google Authenticator, Microsoft Authenticator,
Authy, 1Password, Bitwarden Authenticator, and similar apps.

### What happens if I lose my phone?

Use one of your one-time backup recovery codes. If you lose both your authenticator
and recovery codes, a site administrator can reset your two-step metadata.

### Does social login replace my WordPress password?

When a user links Google, Microsoft, or Facebook as their second step, signing in
via that provider verifies their identity without needing a separate TOTP code for
that session. The WordPress password remains unchanged.

### Is the QR code sent to an external service?

No. The QR code is generated entirely in the user’s browser using a bundled open-
source library (`qrcode-generator` by Kazuhiko Arase, MIT license). Nothing leaves
your server during setup.

### Can I use `wp-config.php` constants for OAuth credentials?

Yes. Define `ZFA_GOOGLE_CLIENT_ID`, `ZFA_GOOGLE_CLIENT_SECRET` (and equivalent `
MICROSOFT` / `FACEBOOK` variants) in `wp-config.php` and the plugin will use them
automatically.

### What are the OAuth redirect URIs I need to register?

The exact URI for each provider is shown on the Social Login Settings page. The 
format is:
 https://yoursite.com/wp-admin/admin-post.php?action=muzzamil_two_step_oauth_callback&
provider=google (Replace `google` with `microsoft` or `facebook` as appropriate.)

### Is this plugin free?

Yes, completely free and open source under the GPL-2.0-or-later license. There are
no paid tiers, license gates, or paywalls.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Muzzamil Two-Step Login Security” is open source software. The following people
have contributed to this plugin.

Contributors

 *   [ Muzzamil Ahmed Khan ](https://profiles.wordpress.org/muzzamilahmedkhan/)

[Translate “Muzzamil Two-Step Login Security” into your language.](https://translate.wordpress.org/projects/wp-plugins/muzzamil-two-step-login-security)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/muzzamil-two-step-login-security/),
check out the [SVN repository](https://plugins.svn.wordpress.org/muzzamil-two-step-login-security/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/muzzamil-two-step-login-security/)
by [RSS](https://plugins.trac.wordpress.org/log/muzzamil-two-step-login-security/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.1.0

 * Rebranded to Muzzamil Two-Step Login Security with updated slug.
 * Add comprehensive External Services documentation in readme for Google, Microsoft,
   and Meta OAuth.
 * Enqueue all scripts and styles using official WordPress APIs.
 * Streamline administrator provider configuration workflow.
 * Maintain complete backward compatibility for AES-256-GCM encrypted credentials
   and TOTP enrollments.

#### 1.0.0

 * Initial release: TOTP authenticator app support, AES-256-GCM encrypted secret
   storage, recovery codes, brute-force rate limiting, and OAuth 2.0 social verification.

## Meta

 *  Version **1.1.0**
 *  Last updated **3 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.0 or higher **
 *  Tested up to **7.1.5**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [2FA](https://wordpress.org/plugins/tags/2fa/)[authentication](https://wordpress.org/plugins/tags/authentication/)
   [login security](https://wordpress.org/plugins/tags/login-security/)[totp](https://wordpress.org/plugins/tags/totp/)
   [two step](https://wordpress.org/plugins/tags/two-step/)
 *  [Advanced View](https://wordpress.org/plugins/muzzamil-two-step-login-security/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/muzzamil-two-step-login-security/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/muzzamil-two-step-login-security/reviews/)

## Contributors

 *   [ Muzzamil Ahmed Khan ](https://profiles.wordpress.org/muzzamilahmedkhan/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/muzzamil-two-step-login-security/)