Home
Videos
ASP.Net MVC5 Free Online Videos
ASP.Net MVC5 - Login using Google - Facebook | SQL Server

ASP.Net MVC5 - Login using Google - Facebook | SQL Server

Description

In this tutorial you'll learn how to login using google, facebook in asp.net MVC5. You can even login using LinkedIn ni MVC 5.

Login using Google - Facebook | SQL Server

In this video tutorial we are going to create an application in ASP.NET MVC to login through Google and Facebook. 

Follow the steps to create app.

Step 1: Create a project in Visual Studio

  • Select File Menu > Project
  • Select Visual C# and then Web 
  • Click ASP.NET Web Application
  • Write project name and path where to save it.
  • Select MVC
  • Click on Change Authentication button
  • Choose Individual User Accounts  

Step 2: Install OWIN Web Interface

  • Right click on App > Manage NuGet Packages
  • Search in Search Field > as OWIN 
  • Select Microsoft Owin then update
  • Accept terms and conditions
  • Run a project then You will see login screen.

Step 3: Setup the Application in Visual Studio 2013

  • Select View > Properties Window 
  • Set the SSL Enabled as "True" 
  • Copy the SSL URL
  • In project app > properties > Web > Project URL (paste in it)

Step 4: Create a google ap at google console

  • go to console.developers.google.com
  • Create new project
  • Go to Credentials
  • Select OAuth consent screen tab
  • Write product name shown to users.
  • Save
  • Create credentials 
  • Choose Web application
  • Write name
  • Set the Authorized JavaScript URL (Project URL)
  • Set the Authorized redirected URL (Project URL)
  • Search in API Google+ and then enable it.
  • Add credentials to your project
  • Create Client ID and Authorized Redirect URL with /sign-google

Step 5: Setup Client Id and Secret in Application

  • In App_Start  > Startup.Auth.cs
  • Set Client Id and Secret for Google Authentication