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


I’m using the auth0-angular HTTP interceptor to attach tokens to my API calls.
Now, I want to make calls to the same API when the user is not logged in (to get some basic ‘public’ information), but the interceptor is reporting “Error: Login required”.

I assume that the interceptor wants to add the token in any case and just breaks if there is none. Wouldn’t it be better to just transmit the HTTP request without an authorization header in that case and let the API deal with it?

Does anybody have an idea for a quick workaround?



Same question… we have certain endpoints that require authentication and others that do not. It would be much easier if the HTTP Intercepter sent requests regardless, just without access tokens if the user is not logged in.

1 Like

I’m encountering the same problem