<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Srinithi Varatharajan on Medium]]></title>
        <description><![CDATA[Stories by Srinithi Varatharajan on Medium]]></description>
        <link>https://medium.com/@srinithivaratharajan?source=rss-f64aa78b9d84------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*d_YYGCRjj9l5wB2tCC87ag.jpeg</url>
            <title>Stories by Srinithi Varatharajan on Medium</title>
            <link>https://medium.com/@srinithivaratharajan?source=rss-f64aa78b9d84------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 13:05:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@srinithivaratharajan/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to automate Multi-Factor Authentication(MFA) with Google Authenticator using Selenium]]></title>
            <link>https://srinithivaratharajan.medium.com/how-to-automate-multi-factor-authentication-mfa-with-google-authenticator-using-selenium-5b99335992f0?source=rss-f64aa78b9d84------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b99335992f0</guid>
            <category><![CDATA[google-authenticator-app]]></category>
            <category><![CDATA[automation-solution]]></category>
            <category><![CDATA[selenium-test-automation]]></category>
            <category><![CDATA[2fa-authentication]]></category>
            <category><![CDATA[mfa]]></category>
            <dc:creator><![CDATA[Srinithi Varatharajan]]></dc:creator>
            <pubDate>Mon, 12 Jul 2021 04:41:24 GMT</pubDate>
            <atom:updated>2021-07-12T04:41:24.579Z</atom:updated>
            <content:encoded><![CDATA[<p>Multi-factor authentication (MFA) is used to add an extra security layer to the system so that they are less prone to vulnerabilities.</p><p><strong>What is Google Authenticator?</strong></p><p>Google authenticator is a security application by Google used to generate Time-based One-time passwords (TOTP) to authenticate users to access the application.</p><p>Google Authenticator generates 2-Step Verification codes on your phone</p><p><strong><em>Pre-requisite :</em></strong></p><ul><li>Valid Google Account (If you don’t have one, please create one to proceed further)</li></ul><p><strong>Steps to follow for Taking Back up code :</strong></p><p><strong>Note</strong> (In this section we have already set up Two-step verification and Authenticator)</p><ol><li>Navigate to <a href="https://myaccount.google.com/security">https://myaccount.google.com/security</a></li><li>Click on the Security tab and click 2 Step Verification section (Make sure 2 Step verification is already turned on)</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bJiGJ58xzhAELANedFEQBA.png" /></figure><p>3. Provide Your email id and password click the next button, It will lead to the two-step verification page</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VExxktTroMR6kufQmSvKHg.png" /></figure><p>4.Click the Change phone icon on the Authenticator App section</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OJSGhnYldmiR3JZdYYVoXA.png" /></figure><p>5. Select the Android or I phone radio Button and click the Next Button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*7lqnNvn53sFyxuO6Wezhjw.png" /></figure><p>6. It will Set up Authenticator Section, Click CAN’T SCAN IT option, and click the Next button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*fAK8FPP0s2tbQAqX64Opxw.png" /></figure><p>7. Note down the Security key from the below section and click the next button <strong>(Before clicking the next button, make sure to install the Google Authenticator app on your phone and enter the copied security key to connect with your Gmail account)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*_R3MkCrzioIACdLYyxI2cw.png" /></figure><p>8. Enter the TOTP Verification code in the below screen and click verify button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*qIvvMaCWNDGjE7ZGpqld8g.png" /></figure><p>9. Once the right TOTP token has been entered successfully, WIndow should show the following screen</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*n9CMp8hcIYcdLyykWL9YkQ.png" /></figure><p>If your test application is enabled with google’s Two-factor authentication, you should get the time-based verification code (TOTP) from the authenticator mobile app and sign in to your account every single time.</p><p>But, in end-to-end testing, how can the test script grab the verification code without accessing the mobile application?</p><p>You can implement a program that computes the Authenticator code inside your test script easily.</p><p><strong>Steps to follow :</strong></p><ol><li>Navigate to <a href="https://mvnrepository.com/artifact/org.jboss.aerogear/aerogear-otp-java/1.0.0">https://mvnrepository.com/artifact/org.jboss.aerogear/aerogear-otp-java/1.0.0</a> and copy the dependency to be added in our maven project pom.xml file</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*06kgCBo6zvPMPQGI3_Fetg.png" /></figure><p>2. Create the following Java class for taking TOTP code through the program</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fQCqLcFXsuhHVUsaMpS_Yw.png" /></figure><p>Before pasting the copied code, it is recommended that it should have decrypted (It is not mandatory for this section however it is best practice to follow)</p><p>3. Use the Generated two factor code in selenium tests and you can validate the generated code with the authenticator app — It should match</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WKVt81cp3cDdbNUfaUawow.png" /></figure><p>Use the above mentioned steps to Automate MFA in your project.</p><p>Thank you!!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b99335992f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>