Skip to content
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

OH2-433 | Implement token refresh #695

Merged

Conversation

SteveGT96
Copy link
Contributor

@SteveGT96 SteveGT96 commented Nov 14, 2024

See OH2-433

@mwithi mwithi requested a review from SilverD3 November 14, 2024 14:44
Copy link
Contributor

@SilverD3 SilverD3 left a comment

Choose a reason for hiding this comment

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

Use setInterval to check every 5 seconds if the token has expired and refresh isn't the most efficient way to achieve token refresh. I would opt for checking the token expiration when a request is sent (if we received a 401, for example) and try to refresh the token.

With the current implementation, token and token refresh will never expired as long as the OH tab in the browser is open, even the user does nothing.

@SteveGT96 SteveGT96 requested a review from SilverD3 November 19, 2024 14:16
@mwithi
Copy link
Member

mwithi commented Nov 21, 2024

Hi guys, ready to be merged? How can I test it?

Copy link
Contributor

@SilverD3 SilverD3 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@mwithi mwithi left a comment

Choose a reason for hiding this comment

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

Reviewed and approved by @SilverD3

@mwithi mwithi merged commit b639612 into informatici:develop Nov 21, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

3 participants