feat: Fetch credentials on token expiry/401
Improved credentials management and error handling. Credentials are invalidated when they expire or become invalid based on responses from the PowerSync service. The frequency of credential fetching has been reduced as a result of this work.
For web we need to communicate over the comlink from the worker to the main tab that invalidation needs to happen.
Follows a similar pattern applied to PowerSync Dart.
Alternative approach to https://github.com/powersync-ja/powersync-js/pull/528
🦋 Changeset detected
Latest commit: 413ad7d660b6e6b2fbc2bfd9474b07292f209a72
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 7 packages
| Name | Type |
|---|---|
| @powersync/web | Minor |
| @powersync/common | Minor |
| @powersync/diagnostics-app | Patch |
| @powersync/node | Patch |
| @powersync/op-sqlite | Patch |
| @powersync/react-native | Patch |
| @powersync/tanstack-react-query | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
I have had the dev release of this work tested by @Omnicpie. Feedback was positive.