Social Network Authentication/Authorization In ASP.NET MVC

Create a new project. Let's say SocialNetworkAuthentication. 

Choose MVC, followed by clicking OK.


After creating the project, go to Soultion Explorer. Open the App_start folder, followed by opening Startup.Auth.cs file. 


We can see uncomment the Service, which we want to use for the authentication. 

Now uncomment the Facebook Service Lines and go to


Go to the My Apps, select Add a New App according to the image given below.

We can see now how to create a new AppID, insert the All Field. Click the create App ID button.


Now, we can see MynewApp, create it and go to the dashboard, so we can find API version, AppID or App Secret.

Now, go to the Setting and click Add platform.

Select the Website.

Here, write the site URL http://localhost:35286/.


Go to the Startup.Auth.cs file and write the appID on appSecret.

Run the project. 


Click Login button, so we can see (Use another Service to log in ), then click Facebook button.

We can see Associate your facebook account or you have successfully authenticated with Facebook.

Insert the E-mail for the registration. 


After the registration, we can manage the account also according to the this image.