auth0-samples / auth0-xamarin-oidc-samples

Auth0 OIDC Client with Xamarin applications
MIT License
30 stars 38 forks source link

Missing Authorization Code #5

Closed vbenavidesa closed 7 years ago

vbenavidesa commented 7 years ago

Hi,

I tried the sample and it runs perfectly, the log in Auth0.com says I logged succesfully, but on the ProcessResponseAsync method on the Auth0 client I get this error and wont get my token information or log into my next activity.

Any idea why am I getting this?

vbenavidesa commented 7 years ago

I found out where the error was, I modified the params on the hosted login page and that prevented the ProcessResponseAsync method of working.

Can I override the ProcessResponseAsync method?

jerriep commented 7 years ago

I do not understand... can you please explain how you want to override it and for what reason?

vbenavidesa commented 7 years ago

@jerriep Hi, Ok I modified the hosted page on my Auth0 dashboard, that is why I was having this issue when logging from my Android App. So I want to know if I can modify the ProcessResponseAsync to add more properties or modify existing ones to not have this issue.

jerriep commented 7 years ago

The ProcessResponseAsync is coming from the underlying OIDC Client library which we are using: https://github.com/IdentityModel/IdentityModel.OidcClient2

There is not much we can do about that.

But also, you would not add extra parameters during code exchange, but rather when you call the /authorize endpoint, for example:

await _client.PrepareLoginAsync(new { my_parameter = "value" });

Will that help?

jerriep commented 7 years ago

Closing issue as no further response received. I believe the solution provided above is correct, but feel free to reopen the issue if this does not resolve your problem