Paxcel Labs Microsoft Tech WCF c#

Using DotNetOpenAuth

We recently got a new client requirement to implement an OAuth 1.0a Service Provider. We looked for libraries and came upon DotNetOpenAuth. This blog is to share our experience.

We had worked on OAuth (What is OAuth?) a couple of years back, when libraries were not available, and we rolled out our own OAuth implementation based on OAuth 1.0 standards.

We recently got a new client requirement to implement an OAuth 1.0a Service Provider. This time, we looked for libraries again, and came upon DotNetOpenAuth

We were fairly surprised by the following facts:

  • The exhaustive library implementations of OAuth 1.0a, OAuth 2.0, OpenID, InfoCard
  • Supported by excellent samples
  • They also provide the source code
  • Well written and documented code

Look here for more information on DotNetOpenAuth

The initial investigation itself revealed that this is something which could be quickly compiled and integrated into the project.

We were able to complete the entire implementation in a few days, which of course led to a Happy client, and the developers.

Through this blog, we want to share our experience that DotNetOpenAuth can and should be tried where needed.

Having said that, we also want to share some of the initial hiccups we faced and how to resolve those.

1. The samples have been written in VS 2012 but you can open them in VS 2010 by changing the .sln file

2. We faced a compilation issue initially, where we found that it needs a strong name verification skip, and to resolve this issue please go through this following link Please make sure you read this before you start.

3. The error log is written to the Event Viewer.

4. For OAuth1 sample, the general log is written to TracePage.aspx and is very useful.