Skip to content

[fix bug 1337448] FxA redirect after login.#4643

Merged
schalkneethling merged 1 commit intomozilla:masterfrom
jpetto:bug-1337448-fxa-lib-redirect-after-login
Feb 8, 2017
Merged

[fix bug 1337448] FxA redirect after login.#4643
schalkneethling merged 1 commit intomozilla:masterfrom
jpetto:bug-1337448-fxa-lib-redirect-after-login

Conversation

@jpetto
Copy link
Contributor

@jpetto jpetto commented Feb 7, 2017

Description

#4579 introduced a regression whereby users logging in to the FxA iframe stopped being redirected to the FxA settings page. This resulted in a significant uptick in errors on the FxA side (which is how the bug was discovered), as well as poor UX (the user saw a "Working..." error message in the iframe that never went away).

This PR fixes that regression, and adds tests.

Bugzilla link

https://bugzilla.mozilla.org/show_bug.cgi?id=1337448

Testing

On demo3, using a profile configured to work with the FxA staging server, log in to Sync on the current firstrun page [1]. You should be redirected to the FxA accounts settings URL.

Also on demo3, using the same profile as above, log in to Sync on the soon to be released funnelcake firstrun page [2]. You should be redirected to the new tab view.

(Working with FxA on a demo is detailed in the docs.)

[1] https://www-demo3.allizom.org/en-US/firefox/51.0/firstrun/
[2] https://www-demo3.allizom.org/en-US/firefox/51.0/firstrun/?f=99

Checklist

  • Related functional & integration tests passing.

}

// client-side redirects (handy for testing)
function doRedirect(destination) {
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 function helps us write unit tests against scripts that perform a redirect. Might be worth using this function in other places where we currently do window.location.href = , but that's another PR.

@jpetto
Copy link
Contributor Author

jpetto commented Feb 7, 2017

@schalkneethling - As Alex is out this week, and this is a fairly important fix, can you find time to review? Thanks!

cc @shane-tomlinson

@schalkneethling
Copy link

@jpetto Code looks good, js test all pass, and tested the redirection on demo3. r+

Copy link

@schalkneethling schalkneethling left a comment

Choose a reason for hiding this comment

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

r+

@shane-tomlinson
Copy link

@jpetto, @schalkneethling - you guys are awesome. Thanks!

@schalkneethling schalkneethling merged commit ad1c128 into mozilla:master Feb 8, 2017
@jpetto jpetto deleted the bug-1337448-fxa-lib-redirect-after-login branch April 18, 2018 15:30
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