Search code examples
c#wpfoauth-2.0xero-api

Redirect back to wpf app from Third party website


I have Wpf desktop application from which i am redirecting user to login to third party website (which use two step authentication). After user logs in third party website returns unique code to the call back url mentioned. Let's say if the callback url is any api call, it will return the code to that api call.

But here in my case the website is called from wpf app by using Process.Start("third party url"). Is there any way i can make third party website to return the unique code to wpf app ?? Basically I need to provide third party, a callback uri which i can detect in wpf app.

I am not sure what i am asking is even possible in wpf. if i had a any website this two step authentication would be so much easier but not sure how to do it in wpf.

Xero(third party) has provided here to do this by using httpListener but it's not working

Help !


Solution

  • The best way i could find to do this is by using web browser control in wpf app.There are so many browser control available for wpf. i used cefsharp chromium browser which can redirect user to specific url and it has frame load end event which is getting called when third party redirects back to specified url.