From 6faabb7bbf0b90a62b5655817ad8d50e0b655f3b Mon Sep 17 00:00:00 2001 From: Joe DeCock Date: Mon, 16 Dec 2024 11:20:57 -0600 Subject: [PATCH] Blazor sample fix The server side token store is registered as scoped, so the underlying dictionary containing tokens needs to be static in our sample. --- .../samples/BlazorServer/Plumbing/ServerSideTokenStore.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/access-token-management/samples/BlazorServer/Plumbing/ServerSideTokenStore.cs b/access-token-management/samples/BlazorServer/Plumbing/ServerSideTokenStore.cs index db263b86..47e77a96 100644 --- a/access-token-management/samples/BlazorServer/Plumbing/ServerSideTokenStore.cs +++ b/access-token-management/samples/BlazorServer/Plumbing/ServerSideTokenStore.cs @@ -13,7 +13,7 @@ namespace BlazorServer.Plumbing; /// public class ServerSideTokenStore : IUserTokenStore { - private readonly ConcurrentDictionary _tokens = new(); + private static readonly ConcurrentDictionary _tokens = new(); public Task GetTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters? parameters = null) {