Two-Factor

説明

「ユーザー」「プロフィール」の「Two-Factor 設定」を使い、アカウントに対して1つまたは複数の2要素認証を有効化し、設定してください:

  • メールコード
  • 時間ベースのワンタイムパスワード (TOTP)
  • FIDO Universal 2nd Factor (U2F)
  • バックアップコード
  • ダミーメソッド (テスト用のみ)

詳細な経緯は、この記事を参照してください。

アクション & フィルター

プラグインで提供するアクションフックとフィルターフックは以下のとおり:

  • two_factor_providers フィルターフックは、メールや Time Based One-Time Password などの利用可能な2要素認証プロバイダーを上書きします。配列値は、2要素認証プロバイダーの PHP クラス名です。
  • two_factor_providers_for_user フィルターは、特定のユーザーが利用可能な二要素プロバイダを上書きします。配列の値はプロバイダクラスのインスタンスで、第二引数にはユーザーオブジェクト WP_User を指定します。
  • two_factor_enabled_providers_for_user フィルターフックは、ユーザーに対して有効化している2要素認証プロバイダーの一覧を上書きします。最初の引数は、有効なプロバイダークラス名の配列であり、2番目の引数はユーザーIDです。
  • two_factor_user_authenticated アクションフックは、認証処理直後に、ログインしたユーザーを判別するための最初の引数として、ログインした WP_User オブジェクトを返します。
  • two_factor_user_api_login_enable フィルターは REST API と XML-RPC での認証をアプリケーションパスワードのみに制限します。2番目の引数にユーザー ID が提供されます。
  • two_factor_email_token_ttl フィルターフックは、メールトークン生成後の有効期間を秒単位で上書きします。第一引数として秒単位の時間を受け付け、また、認証する WP_User オブジェクトの ID も受け付けます。
  • two_factor_email_token_length フィルターは、メールトークンのデフォルト文字数8を上書きします。
  • two_factor_backup_code_length filter overrides the default 8 character count for backup codes. Provides the WP_User of the associated user as the second argument.
  • two_factor_rest_api_can_edit_user filter overrides whether a user’s Two-Factor settings can be edited via the REST API. First argument is the current $can_edit boolean, the second argument is the user ID.

スクリーンショット

  • ユーザープロフィール内の二要素認証設定。
  • ユーザープロフィール内の U2F 認証キーセクション。
  • 認証アプリのコードでログイン。
  • リカバリーコードでログイン。
  • メールのコードでログイン。

FAQ

Two-Factor プラグインはどのバージョンの PHP と WordPress をサポートしていますか ?

このプラグインは最新2つの WordPress メジャーバージョンとその WordPress がサポートする最小の PHP バージョン をサポートしています。

フィードバックを送信したり、バグに関するサポートを受けるには

バグ、機能の提案、その他セキュリティに関連しないフィードバックを報告するには、GitHub 上の Two Factor レポジトリのイシューを利用してください。新しいイシューを立てる際には、既存のイシューを検索し、他の誰かが同じフィードバックを報告していないかどうか確認してください。

セキュリティ関連のバグを報告するには

プラグイン開発チームおよび WordPress コミュニティは、セキュリティ関連のバグ対応を真摯に受け止めています。責任ある開示にご尽力いただいたことに感謝するとともに、そのご貢献を正式に認識できるよう最善を尽くします。

セキュリティの問題を報告するには、WordPress HackerOne プログラムにアクセスしてください。

評価

2025年8月20日 3 replies
A great plugin and absolutely useful and important! Unfortunately, there is a problem that needs to be addressed and resolved: The QR code generated for 2FA apps is reported as incorrect by the 2FAS smartphone app. If you type the code below into the app, everything works fine. This problem did not occur with Google Authenticator. Of course, it seems to be a problem with the 2FAS app, because Google can do it! But shouldn’t the problem be analyzed in more detail on the developer side? I will probably also inform the developer of the app. However, it would certainly be best if the two experts (plugin here and app there) got in touch with each other.
2025年7月17日
This plugin made it really easy to add two-factor authentication to my WordPress test site. The interface is clean, and the setup took just a few minutes. Works well with email and TOTP apps like Google Authenticator. A must-have for basic security!
2025年6月2日 1 reply
Congratulations! After trying several plugins, this one hasn’t disappointed me so far. Let’s hope it continues to do what it says. Congratulations to the developers!
196件のレビューをすべて表示

貢献者と開発者

“Two-Factor” は38ロケールに翻訳されています。 翻訳者のみなさん、翻訳へのご協力ありがとうございます。

“Two-Factor” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログRSS で購読してみてください。

変更履歴

リリース履歴を参照してください。