-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clock skew of 5 minutes #512
Comments
The need of the clock skew is to avoid situations where the client clock and the token issuing service clock are not exactly in sync. However, we plan to make it a configurable value and is in our backlog. Why is your app disconnecting and why do you think this offset is causing it? |
@navyasric thanks for the response. I think making this configurable would be nice. While I was debugging my application that did not acquired token silently #513, I went to Azure AD B2C and configured the token lifetime to 5 minutes (to facilitate the debugging), since my clock and AD B2C clock were in sync AND the name was not set in the Id Token (refer to the other issue) AND the clock skew was set to 300 (5 minutes, which "invalidate" my 5 minutes token) I was branched out to the redirect login page situation, so this is my "disconnect" situation. Probably if the #513 was not a issue I would never been caught by this problem at all. Thanks. |
@cleberdantas We have enhanced our library to make this configurable. In the latest preview of msal, Configuration takes a parameter: tokenRenewalOffsetSeconds?: number; Which addresses this issue. We have recently gone through a redesign of the library's API surface. Please download our latest preview package or pull the dev branch and try updating your code and see if the issue still persists. Please re-open this issue if it persists. We are now throwing error stack traces so we can understand better why your code is failing. If you would like guidance on how to use the new version of the library, please review our wiki page here. |
microsoft-authentication-library-for-js/lib/msal-core/src/UserAgentApplication.ts
Line 883 in fa8ce39
Is this clock skew thing really necessary? I've just spent 2 hours debugging an application that prematurely disconnects users, 5 minutes before the expiresIn that was configured (in Azure B2C)! Does anyone know the necessity or motivation for this trick?
The text was updated successfully, but these errors were encountered: