If the user is logged in and reloads the page, '_isAuthorized' is true in the storage.
Hence authorizedCallback is never called and so neither is runTokenValidatation.
If I understand the code correctly this means the timer that checks if the tokens are expired is never started and so the silent renew process is never started.
@ydg sounds correct, would need to catch this somehow. This would mean that once the token expires, the next API call will return a 401 and redirect to the login. Thanks for finding this, we need a way of fixing this.
what if we moved the execution of
runTokenValidatation() from getUserinfo() to setupModule()
after
if (this.authConfiguration.silent_renew) {
this.oidcSecuritySilentRenew.initRenew();
I tried it locally and it seems to be behaving as I expect, but is there any bigger picture problem I am not seeing ?
If you think this is a valid fix, i'll do a PR.
Thanks for raising this issue. I am having the same problem.
@vicver82 @ydg I fix this as soon as possible. Thanks for raising this issue.
@ydg @vicver82 fixed in version 1.3.17
@damienbod Thank you very much. Your library is great!