liuhongbo / DesktopIppOAuth

A Libaray for desktop application to get the OAuth Access Token of Intuit Partner Platform Rest APIs
Apache License 2.0
3 stars 4 forks source link

How can I handle denied authorization from the user? #2

Open wloderhose opened 8 years ago

wloderhose commented 8 years ago

Hi there,

After using this awesome library for a few days, I've just realized that I don't know how to handle the case in which a user decides not to authorize my app. I would like to display some sort of message and then offer them a chance to retry from my desktop application.

I put a breakpoint at my IppOAuthResultEvent handler. But that only gets fired if the user authorizes the app. Is there some other event that gets fired when they deny authorization? I'm still fairly new to the .NET world and wasn't able to figure if you had that built in or not.

Thanks so much!

liuhongbo commented 8 years ago

I don't think this is doable. When user choose [No, thanks] on the QuickBooks authorize page, quickbooks will not initialize any callback to notify that the user didn't authorize the access.

Here is a basic explain of how the oauth 1.0a works. FYI oauth 1.0a

wloderhose commented 8 years ago

Alright, that's what I was afraid of. Thanks for the help!

On Fri, Feb 12, 2016 at 8:52 PM, liuhongbo notifications@github.com wrote:

I don't think this is doable. When user choose [No, thanks] on the QuickBooks authorize page, quickbooks will not initial any callback to notify that the user didn't authorize the access.

Here is a basic explain of how the oauth 1.0a works. FYI oauth 1.0a https://help.salesforce.com/apex/HTViewHelpDoc?id=remoteaccess_oauth_1_flows.htm

— Reply to this email directly or view it on GitHub https://github.com/liuhongbo/DesktopIppOAuth/issues/2#issuecomment-183559379 .

wloderhose commented 8 years ago

One last question. Have you had a chance to bump up the nuget version since the changes from that last pull request?

liuhongbo commented 8 years ago

just did

paul1956 commented 8 years ago

Right now the browser that opens is the Default browser, is there any way to open the WebBrowser control that I have built into my app? That way I can close it when the validation is done. It would also solve @wloderhose problem because I could read the HTML looking for errors.