This project has moved. For the latest updates, please go here.

OAuth PinAuthorizer WPF desktop issue

Sep 7, 2011 at 7:57 PM

Hi, I love your stuff but I struggle with a precise feature: OAuth sign-in for a WPF client application. (not a console one).

The only sample I found for WPF application demos for PinAuthorizer for a console app with a ReadLine which is great to allow us to pase the pincode before the Authorize process.

I can't figure a simple way for a real WPF windows apps. The PinAuthorizer's GetPin function request to have the pincode before doing the authorization but the code is available only after the page is display in the browser.

Is there no way to split the process ?

1- launch the browser to get the pin code

2- set the GetPin value and launch the authorize 

The only way I think for now if to render some kind of popup dialog during the authorize in the GetPin function delegate but it's not trivial in WPF as there is no simple way to do modal dialog and the dialog must be invoked in the main thread. 

Txs in advance for any help



Sep 7, 2011 at 8:22 PM

Hi Vince,

A popup window is one approach.  Another possibility is how I did the Silverlight OOB example (in the downloadable code) where the page has a built-in browser and a textbox to accept the PIN.


Feb 4, 2012 at 6:40 PM

For Modal windows in WPF...  you can use the ChildWindow in WPF Extended Toolkit.

Or set the modal window's Owner property to the current form, before ShowDialog

    PaymentsWindow pw = new PaymentsWindow();
    pw.OrderNumber = thisInvoice.RefNumber;   
    pw.Owner = this;
    if (pw.ShowDialog())  // a custom boolean property
         // do stuff
    pw = null;