I need to authenticate users via LinkedIn, Vkontakte and other social networks that do not have providers yet.
I succeeded creating custom authentication provider in the following way:
Katana
source code.[provider_name]AuthenticatedContext
class, [provider_name]AuthenticationHandler.ApplyResponseChallengeAsync()
and [provider_name]AuthenticationHandler.AuthenticateCoreAsync()
.Everything works well, but just wondering. Much code is duplicated with no actual change. Is there a way to use any standard stuff for building custom provider, not just copying the files?
Unfortunately not. I also created new providers for LinkedIn and Yahoo and even though I copied much of the code from the Katana project there are little nuances with each provider which means you cannot really use a single code base for all.
BTW, you can check out the LinkedIn and Yahoo providers at http://www.beabigrockstar.com/introducing-the-yahoo-linkedin-oauth-security-providers-for-owin/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With