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

Fix broken token invalidation on web #251

Merged
merged 3 commits into from
Mar 11, 2025
Merged

Fix broken token invalidation on web #251

merged 3 commits into from
Mar 11, 2025

Conversation

simolus3
Copy link
Contributor

This fixes the issue reported here. When the sync service calls invalidCredentialsCallback, the app should fetch new credentials which are then cached by the connector. For this, we need to call prefetchCredentials. fetchCredentials, the method we used to call, obtains credentials without saving them.

We were already calling prefetchCredentials on native platforms, but the web implementation was broken and never refreshed the token. This caused us to keep using the expired token, entering an infinite loop of 401 errors.

@simolus3 simolus3 requested a review from stevensJourney March 10, 2025 17:46
@simolus3 simolus3 force-pushed the fix-token-expiry-web branch from 458ddae to ca2a752 Compare March 10, 2025 17:46
stevensJourney
stevensJourney previously approved these changes Mar 11, 2025
Copy link
Contributor

@stevensJourney stevensJourney left a comment

Choose a reason for hiding this comment

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

Looks good to me

@simolus3 simolus3 merged commit 58098fb into main Mar 11, 2025
11 checks passed
@simolus3 simolus3 deleted the fix-token-expiry-web branch March 11, 2025 18:55
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.

2 participants