Hi, I am using a custom api for my react native app and while specifying scopes such as openid I am getting two audiences in the resulting token. One for my custom api and other for /userinfo endpoint.But while using this token to get the user details it is throwing error when calling the below function.
auth0.users(accessToken).getUser({ id: userInfo.sub });
[Unauthorized: Bad audience: davas-server https://3phtechsolutions.us.auth0.com/userinfo]
From the error davas-server is the custom api identifier. Although userinfo endpoint is present in the audience array it is throwing this error when i am trying to fetch the user details.
Do anyone have an idea, what might be causing this issue