Tag Archives: Code Flow

Implement app roles authorization with Azure AD and ASP.NET Core

This post shows how to implement Azure AD App roles and applied to users or groups in Azure AD. The roles are used in an ASP.NET Core Razor page application as well as a ASP.NET Core API. The roles from the access token and the id token are used to authorize the identity which is […]

Securing an ASP.NET Core Razor Page App using OpenID Connect Code flow with PKCE

This article shows how to secure an ASP.NET Core Razor Page application using the Open ID Connect code flow with PKCE (Proof Key for Code Exchange). The secure token server is implemented using IdentityServer4 but any STS could be used which supports PKCE. Code: https://github.com/damienbod/AspNetCoreHybridFlowWithApi History 2020-12-11 Updated to .NET 5 An ASP.NET Core 5 […]

Web API GitHub OAuth2 Code Flow

This article demonstrates how to setup an OAuth2 code flow example using GitHub as an authorization server and a Web API service as a resource server. Thanks to Jerrie Pelser and Thinktecture for providing code and blogs which made it easy to research this and setup a working example. Code: https://github.com/damienbod/WebAppGitHubCodeFlow Setting up GitHub OAuth2 […]