source-inc/ng-oidc-client

Requests get refired after token refresh

Closed this issue · 3 comments

Describe the bug
When the token gets refreshed all previous requests are fired again.
The request is a normal HTTP call, nothing fancy.

Expected behavior
The token call is the only call that's made

Screenshots
As you see, a few requests get refired and get cancelled.
image

Desktop (please complete the following information):

  • OS: Mac OS
  • Browser: All
  • Version: current version version of package, Angular 9

This bug could also come from the OIDC-Client package but i'm not sure.

Okay, tried a few things and I added take(1) to the identity$ pipe. And now it doesn't repeat the requests, is this a valid fix??
image

Hey @luukhaijes ,

Perfectly valid. identity$ is a long running observable.
So you will want to terminate it.

Updated in readme, Thanks
bd5d373