ASP.NET Core 2.0 OIDC Authentication Using AWS Cognito

AWS Cognito has two parts: User Pools and Federated Identities. With Cognito User Pools, you can add sign-up and sign-in functionality to your ASP.NET Core 2.0 web apps. Although the blog posts such as this one illustrates the use of AWS SDK, you can use Cognito without SDK. Cognito User Pools allow you to integrate your apps using OpenID Connect (OIDC). This will be handy especially when you want to use Cognito with an app such as a third-party product for which you don’t have the source code to tinker with. Of course, the app must support OIDC and that attributes related to OIDC are configurable. Anyways, the objective of this post is to show Cognito integration with ASP.NET Core 2.0 app and that you have the source code, which you can modfiy to your heart’s content.
Continue reading