My current Angular 7 PWA application can't renew the OIDC tokens (obtained via azure adfs) after the id_token
it's expired: all the silentRefresh()
calls fails with following error:
AADSTS50058:A silent sign-in request was sent but no user is signed in
All the silentRefresh()
operation within the id_token
expiration time performs, instead, successfully.
My OauthService initialization is below:
init() {
this.oauthService.events.subscribe(e => e instanceof OAuthErrorEvent ? console.error(e) : console.warn(e));
this.oauthService.configure({...APP_CONFIG.auth.OIDC.config,
postLogoutRedirectUri: window.location.origin,
requestAccessToken: true,
showDebugInformation: true,
strictDiscoveryDocumentValidation: false,
responseType: 'id_token token',
silentRefreshRedirectUri: window.location.origin + '/silent-refresh.html',
});
this.oauthService.tokenValidationHandler = new JwksValidationHandler();
this.oauthService.loadDiscoveryDocument();
this.oauthService.setupAutomaticSilentRefresh();
}
APP_CONFIG.auth.OIDC.config
stores all the endpoints that are not relevant for the question.
How can i resolve this situation? i followed this answer on github and, in fact, can't see any cookie stored in my application domain, even though all the response contains Set-Cookie=
headers. Maybe the problem is related to the missing cookies in my application domain?