Description
I ran into an issue in Firefox where the silent refresh was triggering a location change which is causing an issue for us. This was brought up before in #408. The clearing of the hash in Firefox results in the '#' character being added to the URL. There is code to prevent clearing the hash if it is not an oidc flow by checking preventClearHashAfterLogin
which appears to only be set when doing a silent refresh.
However, for oidc, the hash gets cleared in the processIdToken then() just a little bit below, and preventClearHashAfterLogin
does not get checked.
It looks like the additional check should be added to that line so that silent refreshes don't affect the main document location/URL when using oidc.
I also noticed that the iframe url keeps the tokens in the URL hash. I don't know if that is the expected behavior. Either way, from the discussion in #408 (comment) it doesn't sound like the silent refresh should affect the main document's URL/location.
Thanks!