ToList over casting tokens in External Auth sample (#10159)

This commit is contained in:
Luke Latham 2019-07-12 13:28:55 -05:00 committed by Chris Ross
parent ec519bf1d5
commit 9c69287ed0
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ namespace Identity.ExternalClaims
o.SaveTokens = true;
o.Events.OnCreatingTicket = ctx =>
{
List<AuthenticationToken> tokens = ctx.Properties.GetTokens() as List<AuthenticationToken>;
List<AuthenticationToken> tokens = ctx.Properties.GetTokens().ToList();
tokens.Add(new AuthenticationToken() { Name = "TicketCreated", Value = DateTime.UtcNow.ToString() });
ctx.Properties.StoreTokens(tokens);
return Task.CompletedTask;