Skip to content

decreaseExpirationBySec is being used as miliseconds #1318

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

Open
wawyed opened this issue Mar 16, 2023 · 2 comments
Open

decreaseExpirationBySec is being used as miliseconds #1318

wawyed opened this issue Mar 16, 2023 · 2 comments

Comments

@wawyed
Copy link

wawyed commented Mar 16, 2023

Describe the bug
The variable name and documentation imply that this is use as seconds but the comparisons in the code are against milliseconds values.

Use cases:

parseInt(expiresAt, 10) - this.decreaseExpirationBySec <

expiresAtMSec + clockSkewInMSec - this.decreaseExpirationBySec <= now

We either fix the code or documentation. Probably less breaking change to fix the two usages.

@eddyuk
Copy link

eddyuk commented Sep 21, 2023

Just spent few hours and @wawyed is completely right

@ewolfman
Copy link

hi @manfredsteyer, it looks like this should have been ms and not seconds. What do you think?

IchbinkeinReh added a commit to IchbinkeinReh/angular-oauth2-oidc that referenced this issue Dec 1, 2023
…1000. Also fixes wrong subtraction of getClockSkewInMsec

Signed-off-by: Patrick Bender <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants