Application logic to make login in MVC Web App using Google, Facebook and Twitter

Posted by Ermahesh2009 under ASP.NET MVC on 12/13/2015 | Points: 10 | Views : 587 | Status : [Member] | Replies : 1
my requirement is that **i want to allow users to login sites using Google, Facebook and Twitter account too** .I already have register screen where user can enter his details and that details I saved in Database .

I have doubt How can I allow users to login sites using Google, Facebook and Twitter account too and what information I need to save in db so i can save user choices orders etc. so when next login I can show these order to user .

Technology I am using

I successfully did for Facebook but google/Yahoo need to secure connection (SSL) so i set application SSL Property True , copy then paste SSL Url to web setting under iis , on controller set requirehttps attribute .
after doing all this i am getting error [ssl not trusted error][1]

can you guide me while doing devlopment how i can set ssl for my application

I am doing all thing expect azure things in below url


Posted by: Sheonarayan on: 12/13/2015 [Administrator] HonoraryPlatinum | Points: 25

Hi Ermahesh2009,

If you try to do social authentication yourself, it's a lot of work. There is already third party .dll (DotNetOpenAuth.OAuth.dll, DotNetOpenAuth.OpenId.dll etc.) available in ASP.NET MVC 4 and 5 when you create the default ASP.NET MVC project that allow you to do this. What you need to do is to un comment the ~/App_Start/AuthConfig.cs file RegisterAuth() method code (for respective website). Once you uncomment these codes, you will need key and secret details of respective websites that you will get it once you register your application with them. See how to register your app with twitter at

In your default project when user tries to register, it creates many tables in your databases like webpages_Membership etc as shown at this article In ASP.NET MVC 4, the social login details are stored in these tables.

The link you have given is not working at the time of writing this post so can't see and help much on this.

My suggestion would be to use default .dlls provided rather than writing your own code to integrate.


Sheo Narayan

Ermahesh2009, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response