Creating a custom OAuth client for ASP.NET MVC 4
MVC4 has built-in OAuth support for Facebook, Twitter and Google. But what if you want to use another provider like, GitHub, Dropbox or LinkedIn? Today I figured out, the documentation is scarce and there are plenty of caveats, so here a collection of links that got me started,
06 Dec 2013
Implementing OAuth features in ASP.NET MVC4
Scroll down for the MyOAuthClient source. Basically this is where you want to start. Create your custom client, provide the endpoints, The VerifyAuthenticationCore method needs some extra attention. When ready register yout client using the OAuthWebSecurity.RegisterClient method in AuthConfig.cs
Method not found exception
I crashed into this DotNetAuth OAuthWebSecurity.IsAuthenticatedWithOAuth - Method not found exception and used the suggestions in this post to solve it.
DotNetOpenAuth - missing access token secret
Next issue was a 401 Access Denied response code from the provider, This post helps you out of that one.
ASP.MVC 4 uses DotNetOpenAuth for OAuth authorization. Check this site for docs & source
DevDefined.OAuth library on GitHub
Thanx to Joris Huijbregts for pointing me to this alternative OAuth library on GitHub