Ok I have been reading the library source code and this works, for
anyone else that might be interested.
var authorizationState = new AuthorizationState();
authorizationState.ClientIdentifier = "YOUR_CLIENT_ID";
var uri = userAgentClient.RequestUserAuthorization(authorizationState,
true);
// Then have to use whatever method on your client, most likely an
embedded browser to request the "uri" from above.
// Then the auth server will give you a final redirect url.
// The finalUri will not work if it has a #. Ie
http://localhost/#token_type=bearer&access_token=...., have to replace
the # with ? for the ProcessUserAuthorization method work.
if (userAgentClient.ProcessUserAuthorization(finalUri,
authorizationState) != null)
{
// Success
}