I am following along with the instructions to renew a token at
https://auth0.com/docs/quickstart/spa/vanillajs/05-token-renewal
and I'm getting this error in response:
{"error":"invalid_token","errorDescription":"Audience XXXXXXXXX is not valid."}
When I make the call to renewAuth
, I pass the same audience value I used when calling new WebAuth
(and it's not what I'm seeing in the error message (XXXX), which is an unintelligible sequence of characters).
After further examination, the Audience XXXXXX value that is being returned is my client id.
It turned out that I had the wrong client id after cutting and pasting the code from the quick start link. After fixing the client id, all is now well.