token-management

Manage and refresh access tokens for .NET applications using Duende.AccessTokenManagement.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides robust token management capabilities for .NET applications using Duende.AccessTokenManagement, including caching, token refresh, storage, HttpClientFactory integration, DPoP support, and Blazor Server scenarios.

Core Features & Use Cases

  • Client credentials token caching and automatic handling for machine-to-machine calls.
  • User token management with persistence and silent refresh during web app sessions.
  • Token storage strategies with pluggable stores and per-session retention.
  • HttpClientFactory integration so tokens are attached to outgoing requests transparently.
  • DPoP support for-bound tokens and optional per-client DPoP keys, plus Blazor Server token management patterns.

Quick Start

Configure your ASP.NET Core app with OpenIdConnectAccessTokenManagement, register the token management services, and create HTTP clients that automatically attach tokens to requests.

Frequently Asked Questions about token-management

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

FAQPage Schema
How do I manage and refresh access tokens for .NET applications using HttpClientFactory?

You can manage and refresh access tokens in .NET by integrating Duende.AccessTokenManagement with HttpClientFactory, which transparently attaches tokens to outgoing requests and handles automatic refresh.

How does client credentials token caching work for machine-to-machine calls?

Client credentials token caching stores machine-to-machine access tokens locally and automatically handles their retrieval and refresh, reducing redundant authentication requests and improving application performance.

Can I use DPoP support for sender-constrained tokens with per-client keys?

Yes, DPoP support is available for sender-constrained tokens, allowing you to configure optional per-client DPoP keys to enhance the security of your access token management.

What is the best way to handle user token management and silent refresh in Blazor Server?

The best way to handle user tokens in Blazor Server is using Duende.AccessTokenManagement, which provides specialized patterns for persistence and silent token refresh during active web app sessions.

How do I customize token retrieval strategies and per-request token parameters?

You can customize token retrieval strategies by implementing ITokenRetriever and ITokenRequestCustomizer, allowing you to define per-client and per-request token parameters for extensible access token management.

Does this token management approach support pluggable token storage strategies?

Yes, it supports pluggable token storage strategies with per-session retention, allowing you to configure custom token stores for persisting user access tokens securely across web app sessions.