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: 5217 - no check on cookie as it's always null #5222

Merged
merged 1 commit into from
May 6, 2024

Conversation

monsieurtanuki
Copy link
Contributor

What

  • Recent changes rely on a cookie field being populated.
  • Unfortunately, that field is not populated by OpenFoodAPIClient.login2
  • As a consequence, when returning to the app, the fact that cookie was null erased all local user configuration.

Fixes bug(s)

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 8.68%. Comparing base (4d9c7fc) to head (81ad603).
Report is 100 commits behind head on develop.

Files Patch % Lines
..._app/lib/data_models/user_management_provider.dart 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5222      +/-   ##
==========================================
- Coverage     9.54%   8.68%   -0.87%     
==========================================
  Files          325     327       +2     
  Lines        16411   16575     +164     
==========================================
- Hits          1567    1440     -127     
- Misses       14844   15135     +291     

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

Copy link
Member

@teolemon teolemon left a comment

Choose a reason for hiding this comment

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

So now, we'll have both, right ?

@monsieurtanuki monsieurtanuki merged commit d744fab into openfoodfacts:develop May 6, 2024
6 checks passed
@monsieurtanuki
Copy link
Contributor Author

@teolemon So now even if the cookie field is not populated, as it was the case on your device or mine, that won't reset your local credentials.
How come the cookie returned by login2 is null I don't know, probably worth investigating (in a new off-dart issue), but I assume the most urgent matter was not having to reconnect, UX-wise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

I am getting disconnected as soon as I close the app
3 participants