0

I am new to WP7 and I am working on a WP7 app that communicates with a Rest service using C#. I have been able to successfully develop the async code using HttpWebRequest to interact with it.

However, I am having difficulty with the login aspect (the service abstracts out all the details of login to Facebook so I do not have to deal with them. All I need to do is to go through the service call for login).

The service does the login by providing me a URI that I can call where I need to include several parameters withing the QueryString (such as app and user login info). Another one of those parameters I need to send is a "Response URI" within my app code for receiving the Login responses back. So, as the service executes the login procedure, it will continually send information back to my "Response URI" to notify me of the status of the Login process.

The possible outcomes of the Login process include:
1- a success message in the Querystring to my "Response URI"

2- more interestingly, the service may need my user to enter additional information in order to log in in which case the service wants to display a web page within my app for the user to enter this info.

Due to #2 above, I believe I need the "Response URI" within my WP7 app to be a WebBrowser control. So login responses from the service can be sent there and I just monitor the Query string of the URI displayed on that WebBrowser until I determine that we have arrived at a "final outcome" of the login process. Meanwhile, my app just lets the service make use of the WebBrowser to interact with my user if needed.

My issue is that I do not know how I can set the "Response path" for the login call to be a WebBrowser. Any help or suggestions would be greatly appreciated.

Thanks in advance.

Mr. L
  • 3,098
  • 4
  • 26
  • 26
Hjalmar
  • 23
  • 1
  • 4
  • This sounds a bit like the RPX/JanRain Engage setup - but normally for that service the ResponseUri is there only for the webbrowser method of login. If this is the case, then I'm not sure you've got the API quite right. Can you post more info? – Stuart Mar 22 '11 at 19:54

1 Answers1

0

This response is based on my experience of RPX/JanRain Engage. It might help if we know which login system you are using (it's not facebook itself, or is it?)

  1. If the login system sends you a "need more info" message, then that message will contain a URL to show.
  2. At this point show a page within a WebBrowser and pass in a dummy ResponseUrl (e.g. http://myurl.special/reply)
  3. Then keep monitoring the WebBrowser's OnNavigating event - when the WebBrowser navigates to http://myurl.special/reply then you know you are done

I hope this helps...

Stuart
  • 66,722
  • 7
  • 114
  • 165