Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

feat(brokers): Add brokers for mob_android_v1 and mob_ios_v1 #5084

Merged
merged 6 commits into from
Jun 15, 2017

Conversation

shane-tomlinson
Copy link

@shane-tomlinson shane-tomlinson commented May 19, 2017

fixes #5029

@shane-tomlinson shane-tomlinson self-assigned this May 22, 2017
@shane-tomlinson shane-tomlinson force-pushed the issue-5029-mobile-lib-contexts branch 4 times, most recently from 308428a to 7d75dec Compare June 7, 2017 15:04
@shane-tomlinson shane-tomlinson changed the title [WIP] feat(brokers): Add brokers for mob_android_v1 and mob_ios_v1 feat(brokers): Add brokers for mob_android_v1 and mob_ios_v1 Jun 14, 2017
@shane-tomlinson
Copy link
Author

This is ready for review, @mozilla/fxa-devs - r? @mcomella gave it a "WFM" in #5029

@shane-tomlinson shane-tomlinson removed their assignment Jun 14, 2017
return broker.afterSignInConfirmationPoll(account)
.then((result) => {
assert.isTrue(channelMock.send.calledOnce);
assert.isTrue(channelMock.send.calledWith('email_verified'));
Copy link
Author

Choose a reason for hiding this comment

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

Ensure login data is sent too.

return broker.afterSignUpConfirmationPoll(account)
.then((result) => {
assert.isTrue(channelMock.send.calledOnce);
assert.isTrue(channelMock.send.calledWith('email_verified'));
Copy link
Author

Choose a reason for hiding this comment

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

Ensure login data is sent too.

@@ -40,7 +41,9 @@ define(function (require, exports, module) {
commands: null,

defaultCapabilities: _.extend({}, proto.defaultCapabilities, {
sendChangePasswordNotice: true
sendAfterSignInConfirmationPollNotice: false,
sendAfterSignUpConfirmationPollNotice: false,
Copy link
Contributor

@philbooth philbooth Jun 14, 2017

Choose a reason for hiding this comment

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

A spot of bike-shedding here with my "ubiquitous language" hat on:

I thought we named sign-in confirmation to differentiate it from the email verification step that happens after sign-up. Are we calling them both "confirmation" everywhere now?

Copy link
Author

Choose a reason for hiding this comment

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

No, this is the semantics of the content server. "Confirm" occurs in the tab the user initiated the action. "verify" occurs in the verification tab.

Copy link
Author

Choose a reason for hiding this comment

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

The above comment is not to mean that the semantics the content server uses are not totally messed up and confusing. The are both. I'd love help renaming these methods/concepts internally, every person that comes into the project is confused by the names & corresponding URL scheme.

.then((behavior) => {
if (this.hasCapability('sendAfterSignInConfirmationPollNotice')) {
const loginData = this._getLoginData(account);
return this.send(this.getCommand('EMAIL_VERIFIED'), loginData)
Copy link
Contributor

Choose a reason for hiding this comment

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

Once upon a time we had plans to replace the current sign-in confirmation flow with other approaches, Google Authenticator etc. Would this command name seem weird if/when that happens?

Copy link
Author

Choose a reason for hiding this comment

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

Once upon a time we had plans to replace the current sign-in confirmation flow with other approaches, Google Authenticator etc. Would this command name seem weird if/when that happens?

Possibly. We could just call it "VERIFIED" and ignore the verification method.

Copy link
Author

@shane-tomlinson shane-tomlinson Jun 14, 2017

Choose a reason for hiding this comment

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

Pulling over the comment from the issue:

@mcomella - if we changed the WebChannel message from fxaccounts:email_verified to fxaccounts:verified, would that cause havoc for you?

Copy link
Author

Choose a reason for hiding this comment

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

@mcomella says "@shane-tomlinson Nope! Go for it."

@philbooth
Copy link
Contributor

LGTM! r+

@shane-tomlinson shane-tomlinson merged commit 3cca54e into master Jun 15, 2017
@shane-tomlinson shane-tomlinson deleted the issue-5029-mobile-lib-contexts branch June 15, 2017 12:47
@rfk rfk added this to the FxA-0: quality milestone Jul 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create signin context for standalone mobile fxa libs
3 participants