Skip to content

Bug 2006638 - Add use_cache param to get_access_token#7131

Merged
bendk merged 1 commit into
mozilla:mainfrom
bendk:push-uksxpsosptwr
Jan 8, 2026
Merged

Bug 2006638 - Add use_cache param to get_access_token#7131
bendk merged 1 commit into
mozilla:mainfrom
bendk:push-uksxpsosptwr

Conversation

@bendk

@bendk bendk commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

Removed the ttl param, since multiple optional positional args can get weird. I took a look at searchfox and firefox-ios and there didn't seem to be any consumers using the ttl param.

Alternatively, we could input an options struct with multiple optional params. I didn't go this way because I didn't see anyone actually setting the ttl param, but maybe I'm missing something.

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

@bendk bendk requested a review from mhammond December 18, 2025 15:55
@bendk

bendk commented Dec 18, 2025

Copy link
Copy Markdown
Contributor Author

If this seems good, then I can update firefox-android and firefox-ios to support this flag. This is a breaking change for ios, but not android because it doesn't use the ttl field at all (code)

@bendk bendk force-pushed the push-uksxpsosptwr branch from 7562c93 to e908aea Compare December 18, 2025 17:27
///
/// * `scopes` - Space-separated list of requested scopes.
/// * `ttl` - the ttl in seconds of the token requested from the server.
/// * `use_cache` - optionally set to false to force a new token request.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe note that the returned token is cached even when use_cache = false? (if you do, I guess in the udl and other places this is copied too?)

Removed the `ttl` param, since multiple optional positional args can get
weird.  I took a look at searchfox and firefox-ios and there didn't seem
to be any consumers using the `ttl` param.

Alternatively, we could input an `options` struct with multiple optional
params.  I didn't go this way because I didn't see anyone actually
setting the `ttl` param, but maybe I'm missing something.
@bendk bendk force-pushed the push-uksxpsosptwr branch from 6b2cfeb to 65ae755 Compare January 8, 2026 14:52
@bendk bendk added this pull request to the merge queue Jan 8, 2026
Merged via the queue into mozilla:main with commit 009bf85 Jan 8, 2026
13 checks passed
@bendk bendk deleted the push-uksxpsosptwr branch January 8, 2026 16:24
issammani pushed a commit to bendk/firefox-ios that referenced this pull request Jan 9, 2026
Updated the code to handle the upstream change from app-services:
mozilla/application-services#7131
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