Duende IdentityServer integration with Facebook, Google, Microsoft, GitHub, and Twitter
Introduction
Recently, I worked on a project to integrate external authentication providers such as Facebook, Google, Microsoft, Github, and Twitter into the Duende IdentityServer. This solution enables login to the application using accounts from popular social media platforms. See Figure 1 for an example of external login options.
In this story, I will go over the C# code that enables external authentication providers. It is easier than you may think. The complete working source code is available on GitHub. A complimentary screencast is provided as well.
Architecture Overview
Modern applications typically consist of three major components (see Figure 2 for visual aids)
- Clients — apps such as web, mobile, console
- Api Resources — the REST API resources that provide data to Clients
- Token Service — the security components that issue/validate JWT