Skip to content

Conversation

kumar303
Copy link
Contributor

Fixes mozilla/addons#10667

This does a few things:

  • Both amo:dev and amo:stage go through the proxy which means both the frontend site and the backend API are served on the same domain like production. This should help catch same origin issues locally.
  • Sign-ins work on amo:dev
  • Sign-ins do not work on amo:stage (like before) because we need to configure a new FxA client. I'll do that in a follow-up.

@kumar303 kumar303 requested a review from tofumatt August 21, 2017 16:48
@willdurand
Copy link
Member

willdurand commented Aug 21, 2017

🎉 💯

Just tested this PR and it works well. Thanks @kumar303. It also works for newly created accounts (which did not work before), except that the user gets redirected to http://localhost:3000/en-US/firefox/users/edit, which does not exit (404). I dont think it is in the scope of this PR though. Oh and logout works too.

@kumar303
Copy link
Contributor Author

@willdurand great, thanks for testing it out. I am reminded now that the redirection 404 (for new accounts) is a known issue that will be fixed when mozilla/addons#10588 lands. However, with my patch you will be logged in when you type in the URL localhost:3000 after the 404 so it's not too annoying.

@tofumatt
Copy link
Contributor

Just testing this now, I was beat up by a migraine most of today, sorry! 😢

Copy link
Contributor

@tofumatt tofumatt left a comment

Choose a reason for hiding this comment

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

Just tested locally and I could also sign in and sign out. Looks good, thank you! 👍

},
"amo:stage": {
"command": "better-npm-run start-dev",
"command": "better-npm-run start-dev-proxy",
Copy link
Contributor

Choose a reason for hiding this comment

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

Shoot! My bad, I think this change was my fault 😢

@kumar303
Copy link
Contributor Author

btw, I also tested add-on/theme installation through a custom Nightly build

@kumar303 kumar303 merged commit d759b35 into mozilla:master Aug 21, 2017
@kumar303 kumar303 deleted the fix-fxa-login-iss2941 branch August 21, 2017 19:02
@kumar303
Copy link
Contributor Author

@willdurand be sure to clear your cookies when switching between yarn amo:dev, yarn amo, and yarn amo:stage since they all share the same domain (localhost:3000).

@willdurand
Copy link
Member

ah good to know, thanks!

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.

Cannot login with the dev server
3 participants