Error catalogueThe signed client assertion
aud does not exactly match the token endpoint
What it means
The assertion’s aud must be the token endpoint URL, character for character (trailing slash, case, http/https and path all matter).
Fix
Set aud to the exact token_endpoint string from the SMART configuration.
Seen on real servers
{
"error": "invalid_client",
"error_description": "Invalid token 'aud' value (https://ehr.example/auth/token/). Must be 'https://ehr.example/auth/token'."
}Check it with smart-doctor
Run your login and smart-doctor ranks this cause against the others, with the evidence it found.
npx smart-doctor check my-profileAlready have the server’s error? Explain it without running anything.
npx smart-doctor explain '{"error":"invalid_client","error_description":"Invalid token 'aud' value (https://ehr.example/auth/token/). Must be 'https://ehr.example/auth/token'."}'