title: .NET 5 Console App - Handle OAuth2 Redirect URL
body: <p>I'm trying to get a basic .NET 5 cross-platform console app to be able to get an oauth token through Github's API. I'm fairly familiar with the OAuth2 flow and have implemented several websites that request and serve OAuth tokens.</p>
  <p>My issue is that I cannot figure out how to intercept/listen to the OAuth redirect URL through the console app to get the token and refresh token after the user authorizes through the web flow (which the console app launches their default browser so the user can authorize). I currently have the redirect URL set to <code>localhost</code> and a specific port number.</p>
  <p>How would I go about capturing the OAuth redirect URL? This is a cross-platform console app that will be compiled for Windows, Linux, and OSX. High level code (like<code>HttpClient</code> or 3rd party libraries) are preferred, but I'm willing to go lower level if necessary.</p>