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

Use trimmed API key #1768

Merged
merged 2 commits into from
Jul 3, 2024
Merged

Use trimmed API key #1768

merged 2 commits into from
Jul 3, 2024

Conversation

tonidero
Copy link
Contributor

@tonidero tonidero commented Jul 1, 2024

Description

I noticed that trusted entitlements may fail if passing an API key with extra whitespaces. This is because it's part of the data we are verifying and the backend uses the trimmed version so there is a mismatch. This trims the API key we use in the SDK, so it matches what the backend uses in those cases. Any real API key shouldn't contain any whitespaces so I think it should be fine but lmk what you think

@tonidero tonidero added the pr:fix A bug fix label Jul 1, 2024
@tonidero tonidero requested a review from a team July 1, 2024 12:10
Copy link

codecov bot commented Jul 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.26%. Comparing base (b5bc297) to head (ea4998c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1768   +/-   ##
=======================================
  Coverage   83.26%   83.26%           
=======================================
  Files         223      223           
  Lines        7617     7618    +1     
  Branches     1071     1071           
=======================================
+ Hits         6342     6343    +1     
  Misses        854      854           
  Partials      421      421           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tonidero tonidero requested a review from vegaro July 3, 2024 07:20
Copy link
Contributor

@vegaro vegaro left a comment

Choose a reason for hiding this comment

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

Thanks for making that change!!

@tonidero tonidero enabled auto-merge (squash) July 3, 2024 07:23
@tonidero tonidero merged commit f1445f2 into main Jul 3, 2024
7 checks passed
@tonidero tonidero deleted the use-trimmed-api-key branch July 3, 2024 07:44
tonidero added a commit that referenced this pull request Jul 11, 2024
**This is an automatic release.**

### Bugfixes
* Attempt to fix ANRs by moving some tasks during configure to
background (#1772) via Cesar de la Vega (@vegaro)
* Use trimmed API key (#1768) via Toni Rico (@tonidero)
### Other Changes
* Remove leftovers `ExperimentalPreviewRevenueCatUIPurchasesAPI` (#1778)
via Cesar de la Vega (@vegaro)
* Update migration docs adding back support for `DEFERRED` upgrades
(#1774) via Toni Rico (@tonidero)
* Add 7.12.0 to CHANGELOG (#1769) via Toni Rico (@tonidero)

---------

Co-authored-by: revenuecat-ops <[email protected]>
Co-authored-by: Toni Rico <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:fix A bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants