Skip to content

Conversation

@vbudhram
Copy link
Contributor

Because

  • Before React email first, the content server would append metrics context (flowId, etc) to the state field in the third party auth state object
  • The metrics context are not passed through the React app and might not be in the url

This pull request

  • Passes the metrics context through props to the third party auth component

Issue that this pull request solves

Closes: https://mozilla-hub.atlassian.net/browse/FXA-11732

Checklist

  • 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)

This seemed like it was workign before because I was going through 123Done which manually copies flowIds in the query params.

@vbudhram vbudhram requested a review from a team as a code owner May 22, 2025 20:13
const onClick = useCallback(async () => {
logViewEventOnce(`flow.${party}`, 'oauth-start');

console.log("`${party}-${viewName}`", `${party}-${viewName}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete?

const modifiedParams = deleteParams(params, [

// Combine flowQueryParams and paramsObject, ensuring all values are strings
const paramsObject = Object.fromEntries(params.entries());
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting. Is there something special to copying an object this way? (Instead of, say, const clone = {...og}.)

Copy link
Contributor

@chenba chenba left a comment

Choose a reason for hiding this comment

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

The approach make sense to me. There's a stray console log that probably should be deleted.

@vbudhram vbudhram merged commit c9ed020 into main May 22, 2025
19 checks passed
@vbudhram vbudhram deleted the fxa-11732 branch May 22, 2025 21:22
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.

3 participants