Skip to content

Conversation

@nshirley
Copy link
Contributor

@nshirley nshirley commented Nov 20, 2025

Because

  • We currently fetch all sessions, devices, and oauthClients in series, and it can be slow

This pull request

  • Updates the ConnectedServicesFactory to fetch all bindings concurrently and passes results to merge
  • Updates authorized_clients.list to also fetch refresh and access tokens concurrently to match how other bindings get multiple data sources

Issue that this pull request solves

Closes: FXA-8613

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

…ntly

Because:
 - We currently fetch all sessions, devices, and oauthClients in series, and it can be slow

This Commit:
 - Updates the ConnectedServicesFactory to fetch all bindings concurrently and passes results to merge
 - Updates authorized_clients.list to also fetch refresh and access
   tokens concurrently to match how other bindings get multiple data
sources

Closes: FXA-8613
@nshirley nshirley requested a review from a team as a code owner November 20, 2025 00:15
@nshirley nshirley changed the title chore(fxa-shared): Connected Services Factory fetch bidnings concurrently chore(fxa-shared): Connected Services Factory fetch bindings concurrently Nov 21, 2025
await oauthDB.ready();
const authorizedClients = [];

const [refreshTokens, accessTokens] = await Promise.all([
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is one place that is used as a binding for the ConnectedServicesFactory here in auth. Since I was updating the factory to fetch concurrently I figured it was worth updating this too. The other callbacks for the bindings do similar parallel fetches of data so this keeps it consistent

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