Skip to content

Commit

Permalink
Blazor sample fix
Browse files Browse the repository at this point in the history
The server side token store is registered as scoped, so the underlying dictionary containing tokens needs to be static in our sample.
  • Loading branch information
josephdecock committed Dec 16, 2024
1 parent 473cf2c commit 6faabb7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace BlazorServer.Plumbing;
/// </summary>
public class ServerSideTokenStore : IUserTokenStore
{
private readonly ConcurrentDictionary<string, UserToken> _tokens = new();
private static readonly ConcurrentDictionary<string, UserToken> _tokens = new();

public Task<UserToken> GetTokenAsync(ClaimsPrincipal user, UserTokenRequestParameters? parameters = null)
{
Expand Down

0 comments on commit 6faabb7

Please sign in to comment.