title: Handle failed Silent Authentication in Open Id Connect
body: <p>I have an ASP.NET site that uses Open Id Connect to authenticate with Identity Server. 
  When the authentication token is about to expire I have added a silent authentication(prompt=none) that will renew the token without showing any login dialog to the user. 
  This works fine as long as the user is still logged in to Identity Server.</p>
  
  <p>If the user is no longer logged in, an "login_required" error is returned. I want to handle this error by just letting it fail silently and redirect the user back to the page where the authentication started. 
  When being returned with an error to the AuthenticationFailed notification, the RedirectUri dosen't seem to be available though. Are there any way to access the RedirectUri after getting the error?</p>
  
  <p>My configuration looks something like this(abbreviated):</p>
  
  <pre><code>    app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions {
  ...
  Notifications = new OpenIdConnectAuthenticationNotifications
  {
      AuthenticationFailed = context =&gt;
      {
          // if we failed to authenticate without prompt
          if (context.ProtocolMessage.Error == "login_required")
          {
              context.HandleResponse();
              //context.Response.Redirect("The url to the page where RedirectToIdentityProvider was triggered");
              return Task.FromResult(0);
          }
  
          context.HandleResponse();
          context.Response.Write(context.Exception.Message);
          return Task.FromResult(0);
      },
      RedirectToIdentityProvider = async context =&gt;
      {
          ...
  
          if (ShouldReAuthenticate())
          {
              context.ProtocolMessage.SetParameter("prompt", "none");
          }
  
          ...
      }
  }
  </code></pre>
  
  <p>});</p>