Skip to content

feat: Adding webcredentials to the list of associated domains for iOS build of OpenFoodFacts so credential sharing works between the iOS app and the website #6549

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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

andylin2004
Copy link
Contributor

@andylin2004 andylin2004 commented Apr 12, 2025

What

This pull request adds the webcredentials version of the existing applinks URLs to the list of associated domains for the iOS build of OpenFoodFacts.

  • Copied and pasted the existing list of applinks URLs to the list list of associated domains for the iOS build of OpenFoodFacts, but then swapped out applinks with webcredentials.

Screenshot

N/A

Fixes bug(s)

Part of

@codecov-commenter
Copy link

codecov-commenter commented Apr 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 5.73%. Comparing base (4d9c7fc) to head (2ff3c64).
Report is 882 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #6549      +/-   ##
==========================================
- Coverage     9.54%   5.73%   -3.82%     
==========================================
  Files          325     510     +185     
  Lines        16411   30408   +13997     
==========================================
+ Hits          1567    1744     +177     
- Misses       14844   28664   +13820     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andylin2004
Copy link
Contributor Author

andylin2004 commented Apr 21, 2025

Hi there! Just wondering what the progress is on reviewing this pull request.

cc: @monsieurtanuki @teolemon

@monsieurtanuki
Copy link
Contributor

Hi @andylin2004!
I don't know anything about that subject and therefore unfortunately I cannot review your PR.

@teolemon teolemon requested a review from Copilot May 16, 2025 19:33
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.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@teolemon
Copy link
Member

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly adds webcredentials entries to the iOS associated domains list, which is essential for enabling credential sharing between the app and the website. The changes align with the described intent and Apple's guidelines for associated domains.

One area for consideration is the long-term maintainability of this extensive list of domains, now duplicated for applinks and webcredentials.

Summary of Findings

  • Maintainability of Associated Domains List: The duplication of the extensive domain list for webcredentials raises concerns about long-term maintainability and potential for inconsistencies. Suggesting exploration or discussion of automated generation or validation from a single source.
  • Minor Formatting Changes (Not Commented): Several blank lines were removed throughout the applinks list, and a blank line was added before the new webcredentials block. These are considered low-severity stylistic changes and were not commented on due to the review settings (only medium, high, critical).

Merge Readiness

The core functionality of adding webcredentials appears correct and necessary as per Apple's requirements for credential sharing. However, due to the medium-severity maintainability concern regarding the duplicated list of domains, I recommend discussing potential strategies for managing this list more robustly before merging. If a scripted solution is not immediately feasible, acknowledging this as potential tech debt and ensuring a clear process for manual updates would be advisable.

As an AI reviewer, I am not authorized to approve pull requests; please ensure further review and approval from team members.

Comment on lines +499 to +500

<string>webcredentials:prices.openfoodfacts.org</string>

Choose a reason for hiding this comment

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

medium

The addition of this large block of webcredentials domains effectively duplicates the existing applinks list. While this explicit listing is likely required by Apple for the webcredentials service to function correctly, it does raise a concern for long-term maintainability.

Managing two parallel lists of nearly 500 domains each can be error-prone. For instance, when adding or removing a domain, it would need to be updated in both sections, and typos could easily creep into one list but not the other.

Could you elaborate on any existing mechanisms or plans to manage this list? For example, is there a possibility of using a build script or a pre-commit hook to generate or validate these entries from a single source of truth? This could help prevent inconsistencies and simplify future updates to the domain list.

@github-project-automation github-project-automation bot moved this from 💬 To discuss and validate to 🏗️ In Progress in 🤳🥫 The Open Food Facts mobile app (Android & iOS) May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍎 iOS iOS specific issues or PRs
Projects
Development

Successfully merging this pull request may close these issues.

Implement Credential Sharing with the Website
4 participants