Skip to content

fix(passport): update access token expiry check #2657

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
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

CodeSchwert
Copy link
Contributor

@CodeSchwert CodeSchwert commented Jul 4, 2025

Hi👋, please ensure the PR title follows the below standards:

  • PR is titled with conventional commit style naming: type(scope): message. For example: feat(passport): my new feature
  • If you have introduced modification that necessitates immediate adjustments by this SDK's users to their applications, clients, or integrations to avert disruptions to existing features or functionalities, add a ! after the type(scope), for example feat(passport)!: my new breaking feature

Summary

ID-3828

  • Force token refresh if access token is going to expire (within 30 secs).

Detail and impact of the change

Added

Changed

Deprecated

Removed

Fixed

Security

Anything else worth calling out?

@CodeSchwert CodeSchwert requested a review from a team as a code owner July 4, 2025 08:24
Copy link

nx-cloud bot commented Jul 4, 2025

View your CI Pipeline Execution ↗ for commit eadfb06

Command Status Duration Result
nx affected -t build,lint,test ✅ Succeeded 2m 47s View ↗
nx run-many -p @imtbl/sdk,@imtbl/checkout-widge... ✅ Succeeded 1m 17s View ↗

☁️ Nx Cloud last updated this comment at 2025-07-04 08:39:27 UTC

Comment on lines +17 to +18
export function isAccessTokenExpiredOrExpiring(oidcUser: OidcUser): boolean {
const { id_token: idToken, expired, expires_in } = oidcUser;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this access token check work?

Our testing suggested to me that expired comes from the id token lifetime, so I would assume expires_in would be the same 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants