Skip to content

Conversation

@bendk
Copy link
Contributor

@bendk bendk commented Jan 23, 2026

  • Implemented the token exchange API.
  • Added fxa-client CLI command to test the API.
  • Updated the logging so that we can use the CLI to trace the requests.
  • Added a constant for the relay scope and made the scopes module public.

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.

}
// Get the updated refresh token from state.
refresh_token = match self.state.refresh_token() {
None => return Err(Error::NoCachedToken(scope.to_string())),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It feels like this error variant is misnamed, but it's already used to for scope issues in the code below so I guess we can just stick with it for now.

@bendk
Copy link
Contributor Author

bendk commented Jan 23, 2026

This is not working yet, we need mozilla/fxa#19928 to be merged first. Once that's merged, you should be able to test it out with cargo fxa --log --trace relay-access-token.

@bendk bendk force-pushed the push-rokxmqvqpntu branch 3 times, most recently from 7d14cf4 to e67956c Compare January 23, 2026 17:00
* Implemented the token exchange API.
* Added fxa-client CLI command to test the API.
* Updated the logging so that we can use the CLI to trace the requests.
* Added a constant for the relay scope and made the `scopes` module
  public.
* Added support for specifying custom FxA servers in the CLI
@bendk bendk force-pushed the push-rokxmqvqpntu branch from e67956c to 2af727a Compare January 23, 2026 21:51
///
/// The token server URL can be used to get the URL and access token for the user's sync data.
///
/// **💾 This method alters the persisted account state.**
Copy link

@Gela Gela Jan 23, 2026

Choose a reason for hiding this comment

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

Apologies if this is normal in the app-services rust code, but I think the floppy disk emoji should be removed here.

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