Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(login): let users opt-out of sync when signing in to Firefox #2534

Merged
merged 1 commit into from
Sep 30, 2019

Conversation

vladikoff
Copy link
Contributor

@vladikoff vladikoff commented Sep 17, 2019

vladikoff added a commit to vladikoff/activity-stream that referenced this pull request Sep 17, 2019
vladikoff added a commit to vladikoff/activity-stream that referenced this pull request Sep 17, 2019
@vladikoff vladikoff added this to the Train 147: FxA milestone Sep 18, 2019
@vladikoff vladikoff force-pushed the i2396-no-sync-ff branch 5 times, most recently from b8e7728 to 54cc493 Compare September 26, 2019 20:11
@vladikoff vladikoff marked this pull request as ready for review September 26, 2019 20:13
@vladikoff vladikoff self-assigned this Sep 26, 2019
@vladikoff
Copy link
Contributor Author

@shane-tomlinson @vbudhram I hope you have time to look at this for Firefox 71 / FxA 147 👐

Copy link
Contributor

@vbudhram vbudhram left a comment

Choose a reason for hiding this comment

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

@vladikoff Did a first pass at this, but will do another. Is there a custom build of FF that I can use to test this?

@@ -44,7 +44,7 @@ import Session from './session';
import Storage from './storage';
import StorageMetrics from './storage-metrics';
import SupplicantRelier from '../models/reliers/pairing/supplicant';
import SyncRelier from '../models/reliers/sync';
import BrowserRelier from '../models/reliers/browser';
Copy link
Contributor

Choose a reason for hiding this comment

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

Dig the name 👍🏽

} else if (
this._isServiceSync() ||
// context v3 is able to sign in to Firefox without enabling Sync
this._searchParam('context') === Constants.FX_DESKTOP_V3_CONTEXT
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets make sure we update documentation where needed.

response.capabilities && response.capabilities.multiService;
this.relier.set('multiService', multiService);
if (multiService) {
this.relier.set('service', response.clientId);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a little unclear to me, what is the clientId in this case? Sync or one of the services?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will add some docs for it., but to explain here:

we return the OAuth client id for Desktop Firefox in order to replace some uses of service=sync on the backend

@@ -20,6 +20,10 @@ const QUERY_PARAMETER_SCHEMA = {
// context is not available when verifying.
context: Vat.string().min(1),
country: Vat.string().valid(...AllowedCountries),
// user is signing into the browser and declined to Sync
doNotSync: Vat.boolean(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is declinedSync a better name here?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah I see, the button is called Don't sync.... I think this var name should be fine.

@vladikoff
Copy link
Contributor Author

@vladikoff Did a first pass at this, but will do another. Is there a custom build of FF that I can use to test this?

Thank you!
Yeap see the Testing this change in the first comment of this PR.

@shane-tomlinson
Copy link
Contributor

shane-tomlinson commented Sep 27, 2019

When signing in, I am presented with the screen that asks whether I want to Sync. If I click the blue button to sync the device, CWTS displays and then I am redirected to the SMS form immediately:

If I click the browser's "back" button from there, then "this.onFormSubmitComplete is not a function" shows up in the console.

Screenshot 2019-09-27 at 15 29 33

@vbudhram
Copy link
Contributor

vbudhram commented Sep 27, 2019

I'm also getting
Screen Shot 2019-09-27 at 10 32 32 AM

Which I think makes sense since there is no return function here?

@shane-tomlinson
Copy link
Contributor

shane-tomlinson commented Sep 27, 2019

When signing up, clicking on "Don't sync this device" has no effect:

@vbudhram
Copy link
Contributor

Hey @vladikoff, nice work! I was able to do some more testing after applying the return fix. Here some notes:

  • No sync specific emails, was the intention to do Let users opt-out of sync when signing in to Firefox #2396 (comment) in a follow up or are we nuking sync specific messaging?
  • I received a Sync Enabled...will begin syncing momentarily push notification, when I opted to not to enable sync. Would that be fixed as part of markh patch?
  • When doing the sign-in and enable syncing, the CWTS page flashes and logs me in

screenflash

  • Sign-in confirmation links works as expected! The user will get the Confirm sign-in email, and clicking it will verify the account

@vladikoff
Copy link
Contributor Author

Sorry the loginData issue has now been fixed, I accidentally refactored it out...

@vladikoff
Copy link
Contributor Author

I received a Sync Enabled...will begin syncing momentarily push notification, when I opted to not to enable sync. Would that be fixed as part of markh patch?

Yeap different, patch, filed in
mozilla/application-services#1893

@vladikoff
Copy link
Contributor Author

No sync specific emails

yea! ff now sends client id

@vladikoff vladikoff force-pushed the i2396-no-sync-ff branch 2 times, most recently from 9ed7455 to 9527a87 Compare September 27, 2019 20:27
@vladikoff
Copy link
Contributor Author

@shane-tomlinson @vbudhram please try now!

@vladikoff vladikoff requested a review from vbudhram September 27, 2019 21:07
Copy link
Contributor

@vbudhram vbudhram left a comment

Choose a reason for hiding this comment

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

Thanks @vladikoff, this LGTM 👍!

@vladikoff vladikoff merged commit 7a14b1f into master Sep 30, 2019
@vladikoff vladikoff deleted the i2396-no-sync-ff branch September 30, 2019 15:04
Copy link
Contributor

@shane-tomlinson shane-tomlinson left a comment

Choose a reason for hiding this comment

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

Only two small questions, otherwise r+!


const SCREEN_CLASS = 'screen-would-you-like-to-sync';

const View = FormView.extend(
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the account already created and email sent when this view is displayed? If so, does this view need to poll similar to CWTS in case the user verifies, or are we punting on that b/c of boomerang?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

boomerang + I think in most cases when there's a choice of SYNC vs NOT-Sync, we want to wait for the user...

@ryanfeeley might confirm


assert.isTrue($('body').hasClass(View.SCREEN_CLASS));
it('does not poll', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

When does this happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same scenario as #2534 (comment) , I spoke to @ryanfeeley and for now with email verification we do not poll when there's a choice of not syncing

vladikoff added a commit to vladikoff/activity-stream that referenced this pull request Oct 9, 2019
vladikoff added a commit to vladikoff/activity-stream that referenced this pull request Oct 9, 2019
vladikoff added a commit to vladikoff/activity-stream that referenced this pull request Oct 15, 2019
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.

Let users opt-out of sync when signing in to Firefox
3 participants