Why Using External Logins with ASP.Net Identity is a Bad Idea

Blast Zone No. 1204
Set Up On:
Category: Other - News
Current Office Location:
One Microsoft Way
ASP.Net Identity External Facebook Login
ASP.Net Identity External Facebook Login

If you are thinking of configuring your ASP.Net web application with ASP.Net Identity to let users sign up with external logins like Facebook, Twitter, Google, and Microsoft, don't do it. It is a horrible idea that will surely lock out your users someday. That is because all of these third party providers force developers to upgrade in order to keep using their APIs and depending on how you have your external logins setup you might never be able to fix your site to work with the new version of Facebook, Twitter, Google, or Microsoft or the task will be so monumental as not to be worth the benefit of the external login integration.

How do external logins work with ASP.Net Identity? According to Microsoft they work very easily. They have tutorials where all you need to do is create applications with the third party services, un-comment a couple lines of code in your ASP.Net application, and paste in your credentials. The first time I did that it worked great. Then I went a long time without accessing the site and when I did my Facebook and Twitter login capabilities were broken. I was never able to fix the Twitter login because no matter what I did it would give me a 403 error from Twitter. I was able to fix the Facebook login by upgrading other features that I needed for regular membership after which Facebook was mysteriously working again. Yesterday Facebook told me to fix my app or face suspension because nobody can login to Facebook from this website anymore even though I changed nothing.

The internet is full of examples of people that set-up external logins for their websites only to find them broken overnight at no fault of their own. The internet is also full of horror stories where people troubleshooted for hours only to still have problems. I have never had any problems like that with any membership provider that I have built and I do not believe that allowing people to join this site using their Facebook login credentials is worth the trouble of fixing it again whenever Facebook decides to change things on their end. I want a solution that I will never have to fix again and for me that solution is the default membership in ASP.Net either through Identity or the old SQL Membership.

If this leaves you locked out of this website because you signed up using Twitter or Facebook I would apologize if it were my fault but it is not. Take your gripes up with the social networks that broke your ability to access this site because I am not wasting another day on this problem. If you want to use this site take the time to create a membership and if you do not want to use this site bad enough to create a membership then I really do not want your business bad enough to waste the time needed to serve you.

If you are a developer then I hope you learn from this and stop using external logins because someday it will break. When it breaks you will have to stop what you are doing and change your site to fix problems caused by external login providers. In the meantime nobody that joined your site using an external login will be able to access it anymore. Is that worth enabling users to join using their social media accounts? In my opinion it is not worth it.

8/9/2019 - Another problem is that not all third party logins provide the developer access to the user's email address. For instance if you let people join with Twitter the only ways for people to contact them would be to let them know which Twitter user it is because you can't just setup a form to send them an email. So, the ability to be anonymous is severely compromised.

Use a local account to log in.


 
 

Register if you don't have a local account.

Use another service to log in.


There are no external authentication services configured. See this article for reasons why ASP.NET applications should not support logging in via external services.