title: Call async method on UI thread
body: <p>I'm trying to create WPF client with <em>IdentityServer</em> authentication. I'm using their <code>OidcClient</code> to get logged in. It's whole async while my app is sync and can't be refactored without huge effort. Calling</p>
  
  <pre><code>var result = await _oidcClient.LoginAsync();
  </code></pre>
  
  <p>doesn't wait for the result. Calling <code>Wait()</code> or <code>.Result</code> causes deadlock. Wrapping it to other <code>Task.Run</code> is complaining that the method is not running on UI thread (it opens browser with login dialog).</p>
  
  <p>Do you have any idea, how to solve this? Do I need to write custom sync <code>OidcClient</code>?</p>