In codeFlowCallbackSilentRenewIframe method you define a callbackContext object with isRenewProcess set to false. isRenewProcess is responsible for showing the status when performing a renew.
const callbackContext = {
code,
refreshToken: null,
state,
sessionState,
authResult: null,
isRenewProcess: false, // true ?!
jwtKeys: null,
validationResult: null,
existingIdToken: null,
};
When renew process is running it will reset the browser history but it shouldn't.
isRenewProcess in this case is false but must be true.
if (this.historyCleanUpTurnedOn() && !callbackContext.isRenewProcess) {
this.resetBrowserHistory();
} else {
this.loggerService.logDebug('history clean up inactive');
}
Steps to reproduce the behavior:
The simplest example:
Additional context:
In version 10 you are checking if renew process is running before calling authorizedCallbackProcedure method.
Hey Roman, thanks for the issue. So the bug is that the parameters are dropped when doing a silent renew or that the persisted renew state is not correct? Thanks.
Hey Fabian! Yes, the main bug is that the parameters are dropped when doing a silent renew.
Which config are you using?
This one:
{
stsServer: 'https://localhost:1234',
clientId: '',
redirectUrl: 'http://localhost:1234',
silentRenewUrl: 'http://localhost:1234/silent-renew.html',
responseType: 'code',
scope: '',
postLogoutRedirectUri: 'http://localhost:1234',
silentRenew: true,
startCheckSession: true,
forbiddenRoute: '/forbidden',
unauthorizedRoute: '/unauthorized',
maxIdTokenIatOffsetAllowedInSeconds: 10,
triggerAuthorizationResultEvent: true,
logLevel: 0,
}