- CHECK GOOGLE AUTHENTICATOR ONLINE HOW TO
- CHECK GOOGLE AUTHENTICATOR ONLINE INSTALL
- CHECK GOOGLE AUTHENTICATOR ONLINE MANUAL
- CHECK GOOGLE AUTHENTICATOR ONLINE CODE
- CHECK GOOGLE AUTHENTICATOR ONLINE PASSWORD
CHECK GOOGLE AUTHENTICATOR ONLINE CODE
After that, the user needs to enter that 6 digit code to the login page of the web application and verify. Then the user will get 6 digit code on the mobile application. The user needs to either Scan the QR Code from the webpage or manually enter the setup key. There will be two options as shown in the below image. Then the user needs to open the Google Authenticator mobile App installed in the mobile phone and need to set up the account. 12: We need to Run the Application.Īfter providing the valid username and password, the user will be asked to enter the 6 digit Google Authenticator Code. In this file, we need to edit the MapRoute and set the “Login” action method instead of “Index” action method as the default action method. Return RedirectToAction("Login", "Home") ġ1: We need to configure the Login page as the default startup page.įor doing this, we need to go to the App_Start and open the RouteConfig.cs file and edit it. Return RedirectToAction("MyProfile", "Home") String UserUniqueKey = Session.toString() īool isValid = tfa.ValidateTwoFactorPIN(UserUniqueKey, token) In this method, we will be verifying the authentication token which is generated through Google Authenticator mobile App and then after the successful authentication, user will be redirected to the Web Application. = "AuthorizedProfile" Īuthorized We need to add an action method to verify the 2FA token
ViewBag.Message = "Welcome " + Session.ToString() ĩ: We need to Add a view for the action (here view for “AuthorizedProfile” action).
ViewBag.SetupCode = setupInfo.ManualEntryKey Ĩ: We need to create another action method for the users which are authorized successfully and they will be redirected to after successful Authentication. ViewBag.BarcodeImageUrl = setupInfo.QrCodeSetupImageUrl Login.Username, UserUniqueKey, 300, 300) Var setupInfo = tfa.GenerateSetupCode("Dotnet Awesome", String uniqueKeyforUser = (login.Username + key) TwoFactorAuthenticator tfa = new TwoFactorAuthenticator() If (login.Username = "Administrator" & login.Password = "Password1") Public ActionResult Login(UserLoginModel login) In this method, firstly we will verify the credentials entered by the user from the database and if the user is found to be valid then and then only, we will generate the QR Code and Google Authenticator code for that user account.
CHECK GOOGLE AUTHENTICATOR ONLINE MANUAL
Manual Setup Code : (Html.BeginForm("Verify2FA","Home",ħ: Create another Action(POST) method to verify user credentials using DB. HTML = (ViewBag.Status = null || (Html.BeginForm()) private const string key = //we can use any 10-12 charsĪs We can see in the code below, we have declared a private variable “key”, this key will be used later to generate the Google Authenticator Code.Ħ: We need to add a view for that login action and design it accordingly. After that, we need to write the following code. 5: We need to Add a new action method for loginĪs we can see, we have added “Login” Action to HomeController. We are creating a controller named ‘HomeController’. Then we need to ‘Add Controller’, select Empty MVC Controller and name it. Public string Username //Field to store the PasswordNameįor creating a MVC Controller, we need to go to Solution Explorer, right click on the ‘Controllers’ folder. We have created a folder named “ViewModel” for this and added this class file into this folder.
CHECK GOOGLE AUTHENTICATOR ONLINE INSTALL
After that, we need to search ‘Google Authenticator’ and install it.Īs we can see, we have added a new class “UserLoginModel.cs” in the application. We need to go to the Solution Explorer, Right Click on the References and select the Manage Nuget Packages option. After clicking on the ‘OK’ button, we need to select the ‘Empty’ template and check the MVC checkbox.Ģ: Add NuGet Package for the Google Authenticator Steps to implement Google Authenticator: 1: Create A New Project to implement 2-FAĪs shown below, we need to create a project of type ASP.NET Web Application. The user is granted access of the application only after successful verification. For login, user is asked to enter the Google Authenticator Code which is generated from its mobile App after scanning the QR Code or manually entering the setup key. While logging in the application, it provides an extra layer of authentication apart from the User Credentials.
The below image shows how the Google Authenticator actually works using two-factor authentication.
CHECK GOOGLE AUTHENTICATOR ONLINE PASSWORD
It helps in protecting our accounts against password thefts. Basically, GoogleAuthenticator is useful to verify the user identity before providing them the access to a certain website or Application. Google Authenticator is an OpenSource mobile security Application which is based on the two-factor Authentication (2FA).
CHECK GOOGLE AUTHENTICATOR ONLINE HOW TO
How to integrate Google Authenticator in ASP.Net MVC Project?ġ5 February 2022 What is Google Authenticator?