Redirect URI output different when using URI().

SimonJacksonSimonJackson GBMember
edited January 2015 in Cross Platform with Xamarin

Hi

I have a Web API and two client apps (one for Windows Phone and one for iOS). The iOS client app works fine but the WP client app receives a 500 Internal Server error when logging in. Specifically when redirecting to my application from Facebook. This used to work fine for the WP client, and has just very recently decided to stop working.

The iOS client app receives the following uri from the GetExternalLogins method of the Web API, after I combine it with my root API URL like this for both iOS and WP.

_loginUri = new Uri(new Uri(Constants.ApiUrl), externalLogin.Url);

Here is the iOS value of the variable _loginUri;

https://www.myapp.com/api/Account/ExternalLogin?provider=Facebook&response_type=token&client_id=self&redirect_uri=https: %2F%2Fwww.myapp.com%2F&state=B819Zd7wVG0DZggOSaDj1ahE61nomCBqbHPof-Lx8hU1

The only thing I've noticed about this is that the redirect uri seems to remain escaped, whereas on WP the redirect uri gets parsed to a 'proper' url. Comparing this to the WP value of the variable _loginUri;

https://www.myapp.com/api/Account/ExternalLogin?provider=Facebook&response_type=token&client_id=self&redirect_uri=https://www.myapp.com/&state=Ix8Ubmdd_dre9pv_TJvL2rUGxCkHoBnmpqbOih0SlpM1

I navigate to both through a browser control and only the iOS one works. The WP returns a 500 internal server error when redirecting. Does any one know why the values on the different project types are different, and if this would cause the issue? The WP used to work and nothing has changed... which is worrying.

Sign In or Register to comment.