C# ASP.NET Single Sign-On Implementation
There are multiple options to implement SSO for a .NET application.
Check out the following tutorials online:
Basics of Single Sign on, July 2012
http://www.codeproject.com/Articles/429166/Basics-of-Single-Sign-on-SSO
GaryMcAllisterOnline: ASP.NET MVC 4, ADFS 2.0 and 3rd party STS integration (IdentityServer2), Jan 2013
http://garymcallisteronline.blogspot.com/2013/01/aspnet-mvc-4-adfs-20-and-3rd-party-sts.html
The first one uses ASP.NET Web Forms, while the second one uses ASP.NET MVC4.
If your requirements allow you to use a third-party solution, also consider OpenID. There's an open source library called DotNetOpenAuth.
For further information, read MSDN blog post Integrate OpenAuth/OpenID with your existing ASP.NET application using Universal Providers.
Hope this helps!
I am late to the party, but for option #1, I would go with IdentityServer3(.NET 4.6 or below) or IdentityServer4 (compatible with Core) .
You can reuse your existing user store in your app and plug that to be IdentityServer's User Store. Then the clients must be pointed to your IdentityServer as the open id provider.
There are several Identity providers with SSO support out of the box, also third-party** products.
** The only problem with third party products is that they charge per user/month, and it can be quite expensive.
Some of the tools available and with APIs for .NET are:
- IdentityExpress (with Admin UI) by IdentityServer
- Centrify Identity Service
- Okta Identity (SAML 2.0)
- OneLogin
If you decide to go with your own implementation, you could use the frameworks below categorized by programming language.
C#
- IdentityServer3 (OAuth/OpenID protocols, OWIN/Katana)
- IdentityServer4 (OAuth/OpenID protocols, ASP.NET Core)
- OAuth 2.0 by Okta
Javascript
- passport-openidconnect (node.js)
- oidc-provider (node.js)
- openid-client (node.js)
Python
- pyoidc
- Django OIDC Provider
I would go with IdentityServer4 and ASP.NET Core application, it's easy configurable and you can also add your own authentication provider. It uses OAuth/OpenID protocols which are newer than SAML 2.0 and WS-Federation.