-
Notifications
You must be signed in to change notification settings - Fork 436
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
fix: Use correct offset in ID token expiry check #1529
Conversation
When using a large maxIdTokenIatOffsetAllowedInSeconds the ID token is always marked as expired. Issue damienbod#1505 found this was due to the wrong offset being passed to the validateIdTokenExpNotExpired method. This PR uses the renewTimeBeforeTokenExpiresInSeconds which is used in the auth-state.service.ts hasIdTokenExpiredAndRenewCheckIsEnabled method for a similar purpose.
I think this has to do with an issue I am facing in my application after upgrading to angular and angular-auth-oidc-client 14 - #1522 |
Thanks @liamkeaton |
When can we have a new version with this fix @damienbod? |
☝️ |
Seems like this also could be the root of #1515 |
@andreaslarssen this unfortunately does not fix my issue. This issue (reported above) has to do with renewTimeBeforeTokenExpiresInSeconds property and it is not solved by this release |
It worked for me with version 14.1.5 |
@walter-psjr What worked? I don't think currently renewTimeBeforeTokenExpiresInSeconds is honored, which means you should be able to renew the token - for safety - that number of seconds before it expires. Say you want to make sure you account for latency in your network and set it to 20s. Does the silent renew process start 20s before the token expires? |
When using a large maxIdTokenIatOffsetAllowedInSeconds the ID token is
always marked as expired. Issue #1505 found this was due to the wrong
offset being passed to the validateIdTokenExpNotExpired method. This
PR uses the renewTimeBeforeTokenExpiresInSeconds which is used in the
auth-state.service.ts hasIdTokenExpiredAndRenewCheckIsEnabled method for
a similar purpose.