aspnetcore-authentication

Configure cookies, OpenID Connect, and JWT Bearer authentication in ASP.NET Core.

10|2|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/DuendeSoftware/duende-skills --skill aspnetcore-authentication
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aspnetcore-authentication
Source: https://github.com/DuendeSoftware/duende-skills/tree/main/skills/aspnetcore-authentication
Command: npx skills add https://github.com/DuendeSoftware/duende-skills --skill aspnetcore-authentication

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps you configure and manage authentication in ASP.NET Core applications, covering cookies, OpenID Connect, JWT Bearer, and integration with identity providers like Duende IdentityServer, while clarifying common pitfalls and best practices.

Core Features & Use Cases

  • OIDC Web App patterns with cookie-based auth and external providers
  • API JWT Bearer validation and multi-scheme authentication
  • Comprehensive guidance on claim mapping, token handling, and sign-out flows

Quick Start

Set up an ASP.NET Core project with cookie-based authentication and OpenID Connect against your IdentityServer.

Frequently Asked Questions about aspnetcore-authentication

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure ASP.NET Core authentication with OpenID Connect and cookies?

ASP.NET Core JWT Bearer authentication validates API access tokens by coordinating multi-scheme authentication and claims mapping. This secures APIs by intercepting requests, validating JWT signatures, and mapping token claims to the current user identity.

What is the best way to handle claims mapping in ASP.NET Core?

Claims mapping in ASP.NET Core transforms token payloads into application user identities. Proper mapping ensures that OIDC and JWT Bearer tokens correctly populate user claims for authorization decisions across server-rendered apps and APIs.

Does Duende IdentityServer integrate with ASP.NET Core for sign-in and sign-out flows?

Duende IdentityServer integrates with ASP.NET Core to manage robust sign-in and sign-out flows. It coordinates OpenID Connect protocols, event customization, and token validation to secure web and API authentication end-to-end.

Why does my ASP.NET Core sign-out flow fail to clear cookies properly?

ASP.NET Core sign-out flows fail when cookies are not explicitly cleared during OpenID Connect end session events. Robust sign-out handling requires coordinating the local cookie deletion with the remote IdentityServer logout callback.