Chuyển đến phần nội dung
WordPress.org

tiếng Việt

  • Giao diện
  • Plugin
  • Tin tức
    • Tài liệu hướng dẫn
    • Diễn đàn
  • Giới thiệu
  • Facebook #WPVN
  • Tải WordPress
Tải WordPress
WordPress.org

Plugin Directory

Loqwall 2FA

  • Gửi một plugin
  • Yêu thích của tôi
  • Đăng nhập
  • Gửi một plugin
  • Yêu thích của tôi
  • Đăng nhập

Loqwall 2FA

Bởi mohamedelaaouam99
Tải về
  • Chi tiết
  • Đánh giá
  • Cài đặt
  • Nhà phát triển
Hỗ trợ

Mô tả

Loqwall 2FA adds a secure second authentication step after the standard WordPress username/password login. After entering their credentials, users must verify their identity with a one-time code before gaining access.

Features

  • Email OTP — a 6-digit code is sent to the user’s registered email address.
  • Authenticator App (TOTP) — time-based codes compatible with Google Authenticator, Authy, Bitwarden, and any RFC 6238 app.
  • Backup codes — 10 one-time recovery codes generated per user.
  • Device trust — optionally remember a trusted device for up to 30 days.
  • Role enforcement — admins can be required to use 2FA regardless of their personal preference.
  • Per-user control — users enable and configure 2FA from their own profile page.
  • Rate limiting — brute-force protection on OTP verification.
  • Audit log — every authentication event is recorded in a private database table.
  • No external dependencies — all cryptographic operations use PHP’s built-in functions. No Composer, no remote APIs.
  • Developer-friendly — hooks and filters let you customise behaviour without modifying plugin files.

For Developers: Hooks & Filters

Filters

Loqwall_2FA_required_for_user

Runs on every login attempt. Return false to exempt a user, or true to force 2FA regardless of settings.

add_filter( 'Loqwall_2FA_required_for_user', function( $required, $user ) {
    // Exempt the user with ID 5 from 2FA.
    if ( 5 === $user->ID ) {
        return false;
    }
    return $required;
}, 10, 2 );

Loqwall_2FA_otp_email_message

Filters the email body before the OTP is sent. Receives the body string, the WP_User object, the plain-text 6-digit code, and a boolean indicating whether the email is HTML.

add_filter( 'Loqwall_2FA_otp_email_message', function( $body, $user, $code, $html_mode ) {
    // Append a custom footer to every OTP email.
    return $body . '<p>Need help? Contact support@example.com</p>';
}, 10, 4 );

Actions

Loqwall_2FA_verified

Fires immediately after a user successfully passes 2FA. Receives the user ID and the method used ('email', 'totp', or 'backup_code').

add_action( 'Loqwall_2FA_verified', function( $user_id, $method ) {
    // Log the successful verification to a custom audit system.
    my_audit_log( $user_id, 'login_verified', $method );
}, 10, 2 );

Loqwall_2FA_failed

Fires after each failed 2FA verification attempt. Receives the user ID and the method attempted.

add_action( 'Loqwall_2FA_failed', function( $user_id, $method ) {
    // Notify an admin after a failed attempt.
    wp_mail( get_option('admin_email'), 'Failed 2FA attempt', "User #$user_id failed via $method." );
}, 10, 2 );<h3>Third Party Libraries</h3>

This plugin bundles the following third-party library:

qrcodejs
* Author: Sangmin Shim (davidshimjs)
* License: MIT
* Source: https://github.com/davidshimjs/qrcodejs
* Files: assets/js/qrcode.min.js, assets/js/qrcode.js
* Purpose: Renders the QR code displayed during Authenticator App setup. Used entirely client-side; makes no external network requests.

Cài đặt

  1. Upload the oqwall-2fa folder to the /wp-content/plugins/ directory, or install the plugin through the Plugins > Add New screen in WordPress.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. Navigate to Loqwall 2FA > Settings and enable Two-Factor Authentication.
  4. Each user can then visit their Profile page to set up their preferred 2FA method.

Hỏi đáp

What 2FA methods are supported?

Email OTP (a 6-digit code emailed on each login) and Authenticator App (TOTP, RFC 6238), compatible with Google Authenticator, Authy, Bitwarden, and Microsoft Authenticator.

Can I force administrators to always use 2FA?

Yes. Enable the Force Admins option in Loqwall 2FA > Settings. Administrators will be required to complete 2FA regardless of their personal preference.

What happens if a user loses access to their 2FA method?

Each user has 10 one-time backup codes generated when they first set up 2FA. These can be regenerated by the user or by an administrator from the user profile page. An administrator can also disable 2FA for the user from their profile.

Does this plugin phone home or send any data externally?

No. The plugin makes no outbound HTTP requests. All data (logs, OTP hashes, device cookies) stays on your server.

Is this plugin multisite compatible?

Yes. The plugin works on standard single-site and multisite WordPress installations.

Which browsers are supported?

Any modern browser. The QR code for Authenticator App setup is rendered entirely client-side using the bundled qrcode.js library.

Where can I find the source code?

The full source code is available on the plugin’s WordPress.org repository page. The unminified version of the bundled qrcode.js library is included in assets/js/qrcode.js.

Đánh giá

Không có đánh giá nào cho plugin này.

Người đóng góp & Lập trình viên

“Loqwall 2FA” là mã nguồn mở. Những người sau đã đóng góp vào plugin này.

Những người đóng góp
  • mohamedelaaouam99

Dịch “Loqwall 2FA” sang ngôn ngữ của bạn.

Muốn tham gia phát triển?

Duyệt code, check out SVN repository, hoặc theo dõi nhật ký phát triển qua RSS.

Nhật ký thay đổi

1.0.0

  • Initial release.
  • Email OTP authentication.
  • Authenticator App (TOTP) authentication.
  • Backup recovery codes.
  • Device trust (remember this device).
  • Role-based 2FA enforcement.
  • Audit log with configurable retention.
  • Rate limiting on OTP verification.
  • Translatable — bundled French (fr_FR) translation.

Meta

  • Phiên bản 1.0.0
  • Cập nhật lần cuối 2 ngày trước
  • Số lượt cài đặt Ít hơn 10
  • Phiên bản WordPress 6.0 hoặc cao hơn
  • Đã kiểm tra lên đến 7.0.2
  • Phiên bản PHP 8.0 hoặc cao hơn
  • Ngôn ngữ
    English (US)
  • Thẻ
    2FAauthenticationloginsecuritytwo factor
  • Nâng cao

Đánh giá

Chưa có đánh giá nào được gửi.

Your review

Xem tất cả đánh giá

Những người đóng góp

  • mohamedelaaouam99

Hỗ trợ

Có điều gì muốn nói? cần giúp đỡ?

Xem diễn đàn hỗ trợ

  • Giới thiệu
  • Tin tức
  • Lưu trữ
  • Quyền riêng tư
  • Trưng bày
  • Giao diện
  • Plugin
  • Mẫu khối
  • Học hỏi
  • Hỗ trợ
  • Nhà phát triển
  • WordPress.tv ↗
  • Tham gia
  • Sự kiện
  • Quyên góp ↗
  • Năm cho Tương lai
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org

tiếng Việt

  • Truy cập tài khoản X (trước đây là Twitter) của chúng tôi
  • Visit our Bluesky account
  • Visit our Mastodon account
  • Visit our Threads account
  • Xem trang Facebook của chúng tôi
  • Truy cập tài khoản Instagram của chúng tôi
  • Truy cập tài khoản LinkedIn của chúng tôi
  • Visit our TikTok account
  • Truy cập kênh YouTube của chúng tôi
  • Visit our Tumblr account
Viết code như làm thơ.
The WordPress® trademark is the intellectual property of the WordPress Foundation.