I am trying to work through the MVC client quickstart but running into an "object reference not set ..." error at the line - "@foreach (var prop in (await Context.AuthenticateAsync()).Properties.Items)" from inside my Index.cshtml that I modified following the quickstart doc. Below is the complete Index.cshtml. Could somebody tell me what I am doing wrong here?
@using Microsoft.AspNetCore.Authentication
<h2>Claims</h2>
<dl>
@foreach (var claim in User.Claims)
{
<dt>@claim.Type</dt>
<dd>@claim.Value</dd>
}
</dl>
<h2>Properties</h2>
<dl>
@foreach (var prop in (await Context.AuthenticateAsync()).Properties.Items)
{
<dt>@prop.Key</dt>
<dd>@prop.Value</dd>
}
</dl>