[go: nahoru, domu]

Closed Bug 1857021 Opened 11 months ago Closed 26 days ago

Support for "logout" and "delete_account" messages is missing from fx-webchannel

Categories

(Fenix :: Accounts and Sync, defect, P1)

All
Android
defect

Tracking

(firefox130 fixed)

RESOLVED FIXED
130 Branch
Tracking Status
firefox130 --- fixed

People

(Reporter: mavduevskiy, Assigned: jonalmeida)

References

(Depends on 1 open bug, Blocks 3 open bugs, Regressed 1 open bug)

Details

Attachments

(4 files, 1 obsolete file)

Problem

When a user is deleting the account at "accounts.firefox.com", the app enters reath state

Solution

Listen to the webchannel message confirming account removal, and change the app state accordingly. UX should be similar to what we have on desktop.

Blocks: 1856767
Assignee: nobody → mavduevskiy
Blocks: 1864975
Severity: -- → S3
Summary: [FxA UX] support "account_deleted" message from fx-webchannel → Support "account_deleted" message from fx-webchannel

I'm going to take this since we are landing an FXA patch that would be nice to have both our platform across both of our platforms.

Assignee: mavduevskiy → jonalmeida942
Status: NEW → ASSIGNED
Attachment #9363768 - Attachment is obsolete: true
Type: enhancement → defect
Priority: -- → P1
Summary: Support "account_deleted" message from fx-webchannel → Support "account_deleted" message is missing from fx-webchannel
Summary: Support "account_deleted" message is missing from fx-webchannel → Support for "account_deleted" message is missing from fx-webchannel
Blocks: 1906954
Depends on: 1907643
Depends on: 1908518
Summary: Support for "account_deleted" message is missing from fx-webchannel → Support for "logout" and "delete_account" messages is missing from fx-webchannel

We log out from the FxaAccountManager here for the fxaccounts:logout
and fxaccounts:delete_account messages to stay in line with desktop
and [iOS][1] who the same thing today.

[1[: https://github.com/mozilla-mobile/firefox-ios/blob/3d0481675753805b68ca41a166d9384126f45b02/firefox-ios/RustFxA/FxAWebViewModel.swift#L262-L264

This is something we want to use to make sure that the Custom Tab
intent that we received is from our own application so that we don't
mistakenly try and close an actual Custom Tab in a third party app
that has the web channel code running there.

Depends on D217156

To connect the feature to the UI, we wrap it in an integration class
so that its isolated as we start to handle more commands.

We also early-return when we know that the shared UI is opened from
within the app instead of from a third party app.

Depends on D217158

When adding some of these tests, we add a MainCoroutineRule which
now makes anything that was wrapped in the a Dispatchers.Main
coroutine. Since we weren't doing this before, a bunch of tests
started to fail that were not exercising the real codepaths.

Another example where we need to stop using mocks everywhere unless
it is necessary.

Depends on D217159

Pushed by jonalmeida942@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/50fe4f973e73
Part 1: Add support for LOGOUT and DELETE_ACCOUNT web channel messages r=chenba,android-reviewers
https://hg.mozilla.org/integration/autoland/rev/e84bc1a197fc
Part 2: Add Activity.isIntentInternal() for reusability r=android-reviewers,amejiamarmol
https://hg.mozilla.org/integration/autoland/rev/fa0ced592e7d
Part 3: Make the FxaWebChannelFeature dismiss the activity on logout r=android-reviewers,amejiamarmol
https://hg.mozilla.org/integration/autoland/rev/82c5d07c2f16
Part 4: Add unit tests to FxaWebChannelFeature r=android-reviewers,amejiamarmol
Regressions: 1911357
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: