I made progress finally. I am now able to get `authorization_code` redirected back to my application. Basically in native iOS app i open a webview in separate view that walks user thru Oath2 flow. If Authorization is successful webview redirects back to my app with using custom scheme that I defined with code parameter appended to redirect uri. The application then receives that url and i can parse out the needed code.
However when i try to request an access token i get an error redirect URI is invalid. I do not get how it is possible because i get past first phase and receive authorization code:
curl -X POST \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'code=e87abbee-4831-4893-bbcc-03144c30204c&state=120d4e4b-91ef-1e55-de83-bbb2ed9a3b4f&client_id=d1214878-f40b-4eed-a312-345c92d07876&grant_type=authorization_code'
Here is the Error:
"NativeApp" was attempting to request access to healthcare data with FHIR Play Millennium; unfortunately, the application doesnt appear to be compatible. If you require further assistance, please contact support.
Information to provide to Technical Support
- Correlation ID
- f7b9b7a8-707d-43f8-a08a-27bfabfb2307
Information to provide to NativeApp
The URI provided did not match the original request, or is not a valid URI.
- Error Code
- urn:cerner:error:authorization-server:oauth2:token:code-invalid-redirect-uri