Bartoz,
On 3/10/25 3:40 AM, 'Bartosz Michalak' via SMART on FHIR wrote:
> Hello,
> I'm facing an issue with Smart on FHIR OAuth configuration for Sandbox
> in AthenaHealth and don't know where the problem could be.
>
> The URL where the user is redirected looks like this:
>
>
https://api.preview.platform.athenahealth.com/oauth2/v1/authorize?
> aud=https%3A%2F%
2Fapi.preview.platform.athenahealth.com%2Ffhir%2Fr4&client_id=filtered&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Fcallback&response_type=code&scope=patient%2FPatient.read+patient%2FEncounter.read+patient%2FDocumentReference.read+openid+fhirUser&state=athena%3A6b0b58b79a3e8275ce0b9bdd5a848667
>
> For user credentials I use those provided in their documentation
> (
https://docs.athenahealth.com/api/guides/onboarding-overview <https://
>
docs.athenahealth.com/api/guides/onboarding-overview>)
>
> After patient's authorization I see the following information:
>
> Screenshot at Mar 10 08-35-17.png
>
> My callback receives these params after user authorization:
>
> Parameters: {"state"=>"athena:79f2d00ac13dfd06f29afe5069add0b1",
> "error"=>"access_denied", "error_description"=>"Policy evaluation failed
> for this request, please check the policy configurations."}
>
> Scopes:
> Screenshot at Mar 10 08-39-53.png
>
> What could be the reason? I've double-checked the oAuth configuration
> and everything seems to look fine.
Maybe they don't like redirecting to "localhost"?
-chris