Showing Posts For Qwertasy The Amazon.2906:
I’ve been trying to make a OAuth connection from a iOS application but currently I’m stuck due to a problem with getting the token.
The authorization step is working correctly and the website with login shows up and I’m also getting the code/grant back.
But it looks like the problem I’m having has something to do with the redirect_uri in the token step.
If I don’t send the redirect_uri this is what I get:
{"error":“invalid_request”,“details”:{"valid":false,“data”:{"client_id":<Removed>,“secret”:<Removed>,“grant”:<Removed>,“grant_type”:"authorization_code"},“errors”:{"redirect_uri":“invalid-data”}}}
Now this is clear what is wrong, the redirect_uri that was send is incorrect/unreadable or not send at all.
If I send ‘redirect_uri=http://localhost:8080/oauth2/callback’ the response is:
{"error":“internal_error”,“error_description”:“49:1014:8008:353”}
as it has been said before… not really helpfull
but I’ll always get this error even if I fill in complete nonsence like ‘redirect_uri=a’.
But what I also found out is that if I send ‘redirect_uri=’ (so no value) this is the response:
{"error":“invalid_request”,“details”:{"valid":false,“data”:{"client_id":<Removed>,“secret”:<Removed>,“grant”:<Removed>,“grant_type”:"authorization_code"},“errors”:{"redirect_uri":{"test":“value”,“_value”:""}}}}
I’m not sure what this is suppose to mean but so far I’ve been able to find that this is the only redirect_uri value (or the lack of if) that doesn’t return the for us unreadable error_description.
I’ve tried sending everything as a query params or as a request body (with and without percent escape encoding) but nothing seems to change the error that is being returned.