title: how to pass custom authentication property to openid connect middleware during signout?
body: <p>I want to pass a url parameter to endsession endpoint of my idp.</p>
  <p>this is how I am trying to do this:</p>
  <p>in my client application's signout action I have :</p>
  <pre><code>var authprops = new AuthenticationProperties { RedirectUri = postSignoutReturnUrl };
  authprops.Dictionary[&quot;custom&quot;] = &quot;custom&quot;;
  HttpContext.GetOwinContext().Authentication.SignOut( authprops,
                  OpenIdConnectAuthenticationDefaults.AuthenticationType,
                  CookieAuthenticationDefaults.AuthenticationType);
  </code></pre>
  <p>in my openid connect middleware I have:</p>
  <pre><code>new OpenIdConnectAuthenticationNotifications
              {
                  
                  RedirectToIdentityProvider = n =&gt;
                  {
                      ....
  
                      if (n.ProtocolMessage.RequestType == OpenIdConnectRequestType.Logout)
                      {
  //the state is null during signout !!!
                          if (n.ProtocolMessage.State != null)
                          {
                              var protectedState = n.ProtocolMessage.State.Split('=')[1];
                              var state = n.Options.StateDataFormat.Unprotect(protectedState);
  
                              if (state.Dictionary.TryGetValue(&quot;custom&quot;, out string customParam))
                                  n.ProtocolMessage.SetParameter(&quot;custom&quot;, customParam);
                          }
                      }
  
                      return Task.CompletedTask;
                  },
  </code></pre>
  <p>any suggestion on how to do this the right way?</p>