{"id":1148,"date":"2020-07-30T12:23:00","date_gmt":"2020-07-30T12:23:00","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2020\/07\/30\/setup-two-factor-authentication-in-magento-2-4\/"},"modified":"2025-05-22T12:07:23","modified_gmt":"2025-05-22T06:37:23","slug":"setup-two-factor-authentication-in-magento-2-4","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/setup-two-factor-authentication-in-magento-2-4\/","title":{"rendered":"How to Setup Two Factor Authentication in Magento 2.4"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Did you check the latest&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/magento-2-4-release\/\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2.4<\/a>&nbsp;release yet?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Are you excited to implement the new features that can boost the store\u2019s performance and security?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Well, we are!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And as a part of it, here\u2019s the method to&nbsp;<em><strong>set up two factor authentication in Magento 2.4<\/strong><\/em>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Earlier,&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/install-magento-2-two-factor-authentication\/\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2 did offer an option to install two-factor authentication<\/a>. The store owner can enable or disable the Magento 2 2FA as per the requirements. However, it is not best practice to&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/disable-magento-2-two-factor-authentication\/\" target=\"_blank\" rel=\"noreferrer noopener\">disable Magento 2FA<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, according to&nbsp;<a href=\"https:\/\/experienceleague.adobe.com\/en\/docs\/commerce-operations\/release\/notes\/adobe-commerce\/overview\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2.4 release notes<\/a>,&nbsp;2FA is enabled by default and cannot be disabled.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is done so to make it harder for the spam users to log in to the admin panel without authority.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Security cannot be neglected when it comes to the online store and hence check the method to configure two-factor authentication in Magento 2.4 store.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note: While installing the latest Magento 2.4 version, if you face the&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/solved-syntax-error-while-installing-magento-2-4\/\" target=\"_blank\" rel=\"noreferrer noopener\">Unexpected \u2018)\u2019&nbsp; syntax error<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to setup two factor authentication in Magento 2.4:<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2020\/07\/Screenshot-at-July-30th-2020-2.57.12-pm-1024x510.png\" alt=\"Magento 2 2FA\" class=\"wp-image-9904\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">1. <strong>Login&nbsp;<\/strong>to admin panel<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. Navigate to&nbsp;<strong>Stores &gt; Configuration<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. Select&nbsp;<strong>2FA<\/strong>&nbsp;under&nbsp;<strong>Security<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4. Expand&nbsp;<strong>General<\/strong>&nbsp;section<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">5. Select the&nbsp;<strong>providers to use<\/strong>. You can also select multiple providers<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<ul class=\"wp-block-list\">\n<li>Google Authenticator<\/li>\n\n\n\n<li>Duo Security<\/li>\n\n\n\n<li>Authy<\/li>\n\n\n\n<li>U2F (Yubikey and others)<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">6. <strong>Save<\/strong>&nbsp;the configuration<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once configured, the 2FA is prompted as shown below:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><a href=\"https:\/\/apps.apple.com\/us\/app\/google-authenticator\/id388497605\" target=\"_blank\" rel=\"noreferrer noopener\">Google Authenticator<\/a>:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2020\/07\/Google-Auth-1024x658.png\" alt=\"Google Auth\" class=\"wp-image-9906\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><a href=\"https:\/\/duo.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Duo<\/a>&nbsp;Authentication:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2020\/07\/Duo-Auth-1024x408.png\" alt=\"Duo Auth\" class=\"wp-image-9907\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><a href=\"https:\/\/www.authy.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Authy<\/a>&nbsp;authentication:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2020\/07\/Authy-1024x475.png\" alt=\"Authy\" class=\"wp-image-9908\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><a href=\"https:\/\/www.yubico.com\/products\/\" target=\"_blank\" rel=\"noreferrer noopener\">U2F<\/a>&nbsp;authentication:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2020\/07\/u2f-auth-1024x328.png\" alt=\"u2f auth\" class=\"wp-image-9909\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em><em>(Image Source \u2013&nbsp;<a href=\"https:\/\/experienceleague.adobe.com\/en\/docs\/commerce-admin\/stores-sales\/guide-overview\" target=\"_blank\" rel=\"noreferrer noopener\">Magento Docs<\/a>)<\/em><\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also refer to the video tutorial to set up two-factor authentication in Magento 2.4 from our&nbsp;<a href=\"https:\/\/www.youtube.com\/playlist?list=PLBTOxSAJzwEjM5MilmEqj98Ib80tKBu7r\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2 video tutorial<\/a>&nbsp;series:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"How to Setup Two Factor Authentication in Magento 2.4\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/K04nyga0byc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Secure your Magento 2 admin panel with two-factor authentication using the&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/magento-2-4-3-release\/\" target=\"_blank\" rel=\"noreferrer noopener\">latestMagento 2.4.3<\/a>!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, share the solution with the Magento community via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Did you check the latest&nbsp;Magento 2.4&nbsp;release yet? Are you excited to implement the new features that can boost the store\u2019s performance and security? Well, we&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-1148","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=1148"}],"version-history":[{"count":6,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1148\/revisions"}],"predecessor-version":[{"id":14769,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1148\/revisions\/14769"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=1148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=1148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=1148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}