[auth0-angular] HTTP interceptor error when user is not logged in

I had this same problem using the spa sdk but I was able to resolve it by modifying the InterceptorService file similiar to this: Angular Auth0 Interceptor blocking all api calls unless logged in [Fixed] - Auth0 Community

I think it would be reasonable to have an “ignoredList” parameter on the HttpInterceptorConfig where you could list your anonymous endpoints.

Is there anywhere this can be submitted as a bug/feature?

FYI, here is how I’m working around it. Although I wouldn’t call this thoroughly tested yet…

export class AuthHttpInterceptorExtended  extends AuthHttpInterceptor {  

  intercept(
    req: HttpRequest<any>,
    next: HttpHandler
  ): Observable<HttpEvent<any>> {
    if (req.url.endsWith('guest/network-summary')) {
      return  next.handle(req);
    }
    else {
      return super.intercept(req, next);
    }
  }
}
1 Like