Silent Renew and the "login_required" Error When Using oidc-client
I recently implemented the Silent Renew functionality of oidc-client in an Angular application I work on, and was getting reports that the users' tokens were still expiring. This made no sense to me as I'd verified the code was working during development, but yesterday I found the problem and am hoping it will save someone some time. The error we were getting back was "Error from signinSilent: login_required". This indicates that the user's session is no longer active on IdentityServer and they must re-authenticate -- which, of course, is what we're trying to prevent by using Silent Renew. In our case, the problem wasn't with the Silent Renew functionality, but rather the user's session was expired. The reason why it was expired was because, for some reason, we were setting the session length to 15 minutes instead of the default 10 hours . What was occurring was that Silent Renew was attempting to renew a token after 55 minutes (60 minutes expirat