but When this method calls, in the interceptor user is not authenticated. but in other components user is authenticated, I mean I call isAuthenticated() from auth.service in app.component ngOnInit() and it return true which means the user is authenticated.
I searched a lot but could not find a similar issue.
I have below client setting :
and
AuthService
is like this :and I have an interceptor to add bearer token to all requests
In app.component I call a service which is like this:
but When this method calls, in the
interceptor
user is not authenticated. but in other components user is authenticated, I mean I callisAuthenticated()
fromauth.service
in app.componentngOnInit()
and it returntrue
which means the user is authenticated. I searched a lot but could not find a similar issue.