Getting an instance of FacebookAuthenticationProvider in IdentityServer (Owin app)

I am in the middle of the Thinktecture IdentityServer implementation and adding capacity for mobile applications to provide on the server the initially received Facebook access tokens that will respond to local user authentication.

IdentityServer uses Microsoft Owin middleware to authenticate Facebook. Here's how it gets added to the application:

var fb = new FacebookAuthenticationOptions
{
    AuthenticationType = "Facebook",
    SignInAsAuthenticationType = signInAsType,
    AppId = "...",
    AppSecret = "..."
};

What I want to do, in another class, calls this:

await [FacebookAuthenticationProvider instance].Authenticated(context);

But I can’t figure out how to get the instance FacebookAuthenticationProviderthat I need. Or is it even necessary? Can I just newget up?

+4

All Articles