I have followed all of the online documentation and can’t successfully call custom backend API. I’m getting 401 Unauthorized response, with error message: www-authenticate: Bearer error=“invalid_token”
I’m using @auth0/auth0-angular npm package, and it’s attaching a bearer token to the request, but it’s not a valid jwt token. Am I missing a step?
It looks like you are getting an opaque token, which is only intended to be consumed by Auth0s APIs.
If you want to request a JWT that can be consumed by your custom API, you need to declare and audience, usually the indentifier you registered for your API.
If you would like to follow a tutorial, then check out the second part to the angular quickstart: