Skip to content
This repository has been archived by the owner. It is now read-only.

fix(client): Suppress spurious login messages to the browser. #3155

Merged
merged 1 commit into from Oct 13, 2015

Conversation

@shane-tomlinson
Copy link
Member

@shane-tomlinson shane-tomlinson commented Oct 9, 2015

If the user signs up but does not verify their account,
then visit / or /settings, they are redirected to /confirm
which attempts to notify the browser of login.

Neither unwrapBKey and keyFetchToken are persisted to disk.

If /confirm is shown in a tab other than the original tab,
notifyBrowserOfLogin is called with an account without these
fields. The browser can't do anything without this information,
so don't actually send the message.

fixes #3078

@vladikoff or @zaach - r?

@shane-tomlinson shane-tomlinson added this to the FxA-27: fennec web login milestone Oct 9, 2015
@shane-tomlinson shane-tomlinson changed the title fix(client): Surpress spurious login messages to the browser. fix(client): Suppress spurious login messages to the browser. Oct 12, 2015
@shane-tomlinson shane-tomlinson force-pushed the issue-3078-spurious-login branch 3 times, most recently from e74ba46 to 2c1b478 Oct 12, 2015

.then(function () {
return testIsBrowserNotifiedOfLogin(self, email);

This comment has been minimized.

@shane-tomlinson

shane-tomlinson Oct 12, 2015
Author Member

This PR uncovered the fact that this test was incorrect, and because of lucky timing, not failing. The account used to sign in was verified, yet testIsBrowserNotifiedOfLogin should have been failing because by default, it checks if the account is unverified.

If the user signs up but does not verify their account,
then visit `/` or `/settings`, they are redirected to `/confirm`
which attempts to notify the browser of login.

Neither `unwrapBKey` and `keyFetchToken` are persisted to disk.

If `/confirm` is shown in a tab other than the original tab,
`notifyBrowserOfLogin` is called with an account without these
fields. The browser can't do anything without this information,
so don't actually send the message.

fixes #3078
@shane-tomlinson shane-tomlinson force-pushed the issue-3078-spurious-login branch from 2c1b478 to 23fbe8b Oct 13, 2015
vladikoff added a commit that referenced this pull request Oct 13, 2015
fix(client): Suppress spurious `login` messages to the browser. r=vladikoff
@vladikoff vladikoff merged commit 9554071 into master Oct 13, 2015
4 checks passed
4 checks passed
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.0004%) to 98.898%
Details
@vladikoff
Copy link
Contributor

@vladikoff vladikoff commented Oct 13, 2015

👍

@vladikoff vladikoff deleted the issue-3078-spurious-login branch Oct 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants