In Backbone we ask users to confirm that they want to merge their Sync data on submission of password signin, if the flow is force_auth since they haven't answered the prompt at this point. We want to do the same for React
This commit:
Modifies the fxaCanLinkAccount web channel message to return a promise waiting for the browser's response, and only proceeds if the user confirms
fixes FXA-9868
Our functional tests for force auth covers this case, but I can add a couple of unit tests if we want.
Maybe there's a better way to test this but I launched fxa-dev-launcher, then console.logged the test credentials and URL for these Sync desktop v3 force auth tests, ran one (yarn test --grep="sync v3 with a registered email, registered uid" --debug) and copied the URL output into the window dev-launcher opened and added showReactApp=true to it.
I saw when running these tests in Backbone this is where we were sending the message (on submit). So long as you answer OK, even if the PW is incorrect we don't re-prompt.
@vbudhram Thanks for testing! I removed that console log, I'll go ahead and merge since that was the only change and CI was green, and I want to rebase Valerie's PR on this before the tag.
Because:
This commit:
fixes FXA-9868
Our functional tests for force auth covers this case, but I can add a couple of unit tests if we want.
Maybe there's a better way to test this but I launched
fxa-dev-launcher
, then console.logged the test credentials and URL for these Sync desktop v3 force auth tests, ran one (yarn test --grep="sync v3 with a registered email, registered uid" --debug
) and copied the URL output into the window dev-launcher opened and addedshowReactApp=true
to it.I saw when running these tests in Backbone this is where we were sending the message (on submit). So long as you answer OK, even if the PW is incorrect we don't re-prompt.