Developer forum

Forum » Development » Authenticating users with own OAuth provider

Authenticating users with own OAuth provider

Þórhallur Hálfdánarson
Þórhallur Hálfdánarson
Reply

Hi,

We are establishing a Single Sign-on infrastructure so that our customers can authenticate to different system of ours using the same login, and naturally want to extend to our ecommerce site.

https://doc.dynamicweb.com/documentation-9/users/user-management/external-authentication gives a nice overview but doesn't offer plain OAuth; in Control Panel -> External Authencitation there are providers for Google, Twitter, Facebook and AD already defined. Adding new shows available login providers as AD, Facebook, Google and Twitter.

Looking at https://doc.dynamicweb.com/forum/development/development/federated-identity-management-single-sign-on-and-dynamicweb we discovered the solution from Jonas Dam at dwtc15 (for Linkedin), that appears to be for DW8.

In the process we found some interesting DLLs:

  • Dynamicweb.Content.Social.Adapters.ExternalAuthentication.dll
  • Dynamicweb.Content.Social.Adapters.FacebookAdapter.dll
  • Dynamicweb.Content.Social.Adapters.GooglePlusAdapter.dll
  • Dynamicweb.Content.Social.Adapters.LinkedInAdapter.dll
  • Dynamicweb.Content.Social.Adapters.OAuth.dll
  • Dynamicweb.Content.Social.Adapters.TwitterAdapter.dll

Indeed there seems to be something already shipped pertaining to OAuth (and LinkedIn), that's not exposed in the DW Admin UI.

So the question arises: Is it simply a matter of simple configuration to hook up to a standard OAuth provider, or will we have to build our own? And if we need to build our own, are there any more up to date reference projects available?

-Tolli


Replies

 
Nicolai Pedersen
Reply

Hi Tolli

The adapters you have found are all providers for external authentication in Dynamicweb and you can create your own by inheriting the "Adapter" class, see: https://doc.dynamicweb.com/api/html/d18aa0eb-ebe6-60c0-7726-8d798ad3224d.htm

We ship a linkedin and oauth adapter already, see https://www.myget.org/feed/dynamicweb-packages/package/nuget/Dynamicweb.Content.Social.Adapters.LinkedInAdapter and https://www.myget.org/feed/dynamicweb-packages/package/nuget/Dynamicweb.Content.Social.Adapters.OAuth you can install.

I agree they seem very secret...

Attached find the source code for all the adapters for external authentication using OAuth - feel free to rename, recompile and implement whatever you need on them.

BR Nicolai

 
Þórhallur Hálfdánarson
Þórhallur Hálfdánarson
Reply

Thanks Nicolai!

We'll experiment with this soon (and post results here)

-Tolli

 

You must be logged in to post in the forum