title: Run code after openid connect sign-in in Asp.net Core
body: <p>I am trying to figure out the best way to run some code once a user has authenticated themselves using OpenID Connect on a Dotnet Core MVC App. I don't want to hard code a redirect URL after sign-in because they still need to end up where they were trying to get to after authentication.  I just need to run code eg. "check if its the first time sign-in and set a flag" or something similar.</p>
  
  <p>I was using a middle-ware but since this gets called for every request its causing some problems. </p>
  
  <p>Does anyone have any ideas on how to achieve this?</p>