Skip to content

Remove User Id header #178

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

Merged
merged 6 commits into from
Apr 24, 2025
Merged

Remove User Id header #178

merged 6 commits into from
Apr 24, 2025

Conversation

stevensJourney
Copy link
Contributor

@stevensJourney stevensJourney commented Apr 24, 2025

Overview

This removes an unnecessary User-Id header which is currently being added to PowerSync service requests.

This header has not been used by the service for a long time.

The parameter in PowerSyncCredentials has been deprecated.

@stevensJourney stevensJourney requested a review from Copilot April 24, 2025 12:09
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request removes the obsolete "User-Id" header from internal PowerSync service requests and deprecates the associated property in the credentials class. Key changes include:

  • Removing the "User-Id" header addition in SyncStream.
  • Deprecating the userId property in PowerSyncCredentials.
  • Updating the CHANGELOG and README to reflect the removal.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
core/src/commonMain/kotlin/com/powersync/sync/SyncStream.kt Removed the unused "User-Id" header from HTTP header configuration.
core/src/commonMain/kotlin/com/powersync/connectors/PowerSyncCredentials.kt Deprecated the userId property and maintained its inclusion in toString output.
README.md Adjusted documentation to match new header configuration.
CHANGELOG.md Updated changelog to document the removal of the "User-Id" header.
Comments suppressed due to low confidence (1)

core/src/commonMain/kotlin/com/powersync/connectors/PowerSyncCredentials.kt:30

  • The deprecated userId property is still included in the toString output, which may lead to confusion on its usage. Consider updating this method to remove or adjust the representation of userId.
override fun toString(): String = "PowerSyncCredentials<endpoint: $endpoint userId: $userId>"

@stevensJourney stevensJourney marked this pull request as ready for review April 24, 2025 12:29
@stevensJourney stevensJourney requested a review from simolus3 April 24, 2025 12:31
@stevensJourney stevensJourney merged commit 3ea01ff into main Apr 24, 2025
3 checks passed
@stevensJourney stevensJourney deleted the userid branch April 24, 2025 13:27
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