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?
Configuration:
AuthModule.forRoot({
domain: 'xxxx.auth0.com',
clientId: 'xxxxxxx',
httpInterceptor: {
allowedList: [
{ uri: 'https://localhost:44317/*' }
]
}
}),
],
providers: [{ provide: HTTP_INTERCEPTORS, useClass: AuthHttpInterceptor, multi: true },],
Here’s the bearer token that is getting attached to the request:
authorization: Bearer -GdEMsgGB6PQA5RQ_EQLWoefS3GW1EOo
Thanks in advance,
William