firefox-ios icon indicating copy to clipboard operation
firefox-ios copied to clipboard

Bugfix FXIOS-14400 [Relay] Fix OAuth scopes

Open mattreaganmozilla opened this issue 1 month ago โ€ข 3 comments

:scroll: Tickets

Jira ticket

:bulb: Description

Fix OAuth scopes for Relay.

:pencil: Checklist

  • [x] I filled in the ticket numbers and a description of my work
  • [x] I updated the PR name to follow our PR naming guidelines
  • [ ] I ensured unit tests pass and wrote tests for new code
  • [ ] If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver)
  • [ ] If adding telemetry, I read the data stewardship requirements and will request a data review
  • [ ] If adding or modifying strings, I read the guidelines and will request a string review from l10n
  • [ ] If needed, I updated documentation and added comments to complex code

mattreaganmozilla avatar Dec 10 '25 02:12 mattreaganmozilla

@issammani Can I get your ๐Ÿ‘€ on this? It looks like we reference these OAuth scopes in 3 places. One is called during a new sign-in, one is called when launching already signed-in, and the other I'm not certain of the user flow.

mattreaganmozilla avatar Dec 10 '25 02:12 mattreaganmozilla

Messages
:book: Project coverage: 38.35%

๐Ÿงน Tidy commit

Just 5 file(s) touched. Thanks for keeping it clean and review-friendly!

โŒ Per-file test coverage gate

The following changed file(s) are below 35.0% coverage:

File Coverage Required
firefox-ios/Client/Frontend/Browser/RelayController.swift 8.4% 35.0%

Client.app: Coverage: 37.29

File Coverage
FirefoxAccountSignInViewController.swift 35.62% โš ๏ธ
FxAWebViewModel.swift 14.02% โš ๏ธ
RelayController.swift 8.39% โš ๏ธ

libAccount.a: Coverage: 55.13

File Coverage
RustFirefoxAccounts.swift 58.3% โœ…

Generated by :no_entry_sign: Danger Swift against 778449062f9685bb8503234fa9b9403f19031d24

mobiletest-ci-bot avatar Dec 10 '25 02:12 mobiletest-ci-bot

@issammani Can I get your ๐Ÿ‘€ on this? It looks like we reference these OAuth scopes in 3 places. One is called during a new sign-in, one is called when launching already signed-in, and the other I'm not certain of the user flow.

What you did makes sense. The third place is for when we don't pass a scope to the individual methods. But I like what you did better being explicit everywhere so we don't get any surprises.

https://github.com/mozilla-mobile/firefox-ios/blob/25673ec5afac99d880afa3b36d30f259561a5b3f/MozillaRustComponents/Sources/MozillaRustComponentsWrapper/FxAClient/FxAccountManager.swift#L152-L154

issammani avatar Dec 10 '25 10:12 issammani

I'm going to merge. Was hoping to get additional eyes from AS team just as a sanity check but I can revisit this later if needed, would like to unblock Relay testing.

mattreaganmozilla avatar Dec 10 '25 20:12 mattreaganmozilla

๐Ÿš€ PR merged to main, targeting version: 147.0

github-actions[bot] avatar Dec 10 '25 20:12 github-actions[bot]

+cc @mhammond This is merged but I can revert easily if you have any concerns. Thank you.

mattreaganmozilla avatar Dec 10 '25 22:12 mattreaganmozilla