Download for MacApple silicon, macOS 14+
Skill

token-management

@duendesoftware Updated 2026-10-16

Token management patterns using Duende.AccessTokenManagement. Covers client credential token caching, user token refresh, token storage, HttpClientFactory integration, DPoP support, and common configuration pitfalls. Also includes Blazor Server token management.

ai-agentsclaudeclaude-code

Install

With your agent

Install OMGSkills skill "duendesoftware/duende-skills:skills/token-management" into this agent's normal skills directory: call the OMGSkills MCP get_install_plan tool for your agent and run the script it returns (it installs only the pinned commit and verifies SKILL.md), and stop if MCP or the pin is unavailable. Do not overwrite or change existing skills without asking me.

Manual command

git clone https://github.com/DuendeSoftware/duende-skills /tmp/duende-skills && ln -s /tmp/duende-skills/skills/token-management ~/.claude/skills/token-management

From README

Token Management When to Use This Skill Use this skill when: Building a .NET worker service or daemon that calls APIs using the client credentials flow Building an ASP.NET Core web application that calls APIs on behalf of the currently logged-in user Integrating Duende.AccessTokenManagement or Duende.AccessTokenManagement.OpenIdConnect with IHttpClientFactory Configuring token caching — in-memory, distributed (Redis), or hybrid — for machine-to-machine tokens Adding DPoP (Demonstrating Proof-of-Possession) key binding to access tokens Implementing API-to-API delegation where a downstream service calls further APIs with either user tokens or client credentials Revoking refresh tokens on user sign-out Core Principles Prefer Automatic Over Manual — Use IHttpClientFactory-integrated clients; they acquire, cache, refresh, and attach tokens transparently. Call GetAccessTokenAsync manually only when the factory pattern is insufficient. Never Cache Tokens in Code — The library owns the cache.