Closed Bug 999198 Opened 11 years ago Closed 4 years ago

Android Firefox Account client handling of remotely deleted accounts

Categories

(Firefox for Android Graveyard :: Firefox Accounts, defect, P5)

29 Branch
All
Android
defect

Tracking

(firefox28 unaffected, firefox29 affected, firefox30 affected, firefox31 affected, fennec+)

RESOLVED INCOMPLETE
Tracking Status
firefox28 --- unaffected
firefox29 --- affected
firefox30 --- affected
firefox31 --- affected
fennec + ---

People

(Reporter: edwong, Unassigned)

References

Details

1. on android sign into fxa 2. goto accounts.firefox.com/settings 3. sign in and delete acct 4. restart phone (to get refresh cert/tokens) actual: asked to reauthenticate, you will be continually asked this in notification bar. expected: your sync account should be removed from the phone at least, or the client should stop all attempts to sync or sign into fxa
This depends on the server returning a "no, dummy, that account got deleted" response, and us handling it. I recall recent discussion around this, but I don't know if we have a bug for it -- Nick?
Hardware: ARM → All
tracking-fennec: --- → ?
We've created an /account/status endpoint for clients to check whether an account still exists. The idea is that when a client gets an auth error from the server, it can check whether the accounts still exists before prompting to user to re-auth. If it doesn't exist anymore, then hopefully the client could automatically remove itself. Desktop bug: Bug 992390. API reference for /account/status: https://github.com/mozilla/fxa-auth-server/blob/master/docs/api.md#get-v1accountstatus
tracking-fennec: ? → 31+
Summary: delete firefox account gets user stuck in reauth loop → Android Firefox Account client handling of remotely deleted accounts
Being realistic about tracking, because we have lots and lots of things to do.
tracking-fennec: 31+ → +
filter on [mass-p5]
Priority: -- → P5
This ticket is the Android equivalent of Bug 1221703. It's recently been exposed by https://github.com/mozilla/fxa-content-server/issues/3261. I think the right thing to do is to get the old-and-busted Android Account object out of the way as soon as possible. It's not clear to me if there's value messaging that the account is being removed; or if there's value in having a separate "Account has been deleted remotely" state requiring user action. Technically, both can be done. antlam: can you provide some UX guidance here? Suppose a user has a Firefox Account connected to their phone and a desktop machine. On the desktop machine, they remove the Firefox Account from the server. Their phone starts failing to Sync, and I think it will show a notification asking you to log back in. The user cannot ever log back in. What should Firefox do in this situation?
Flags: needinfo?(alam)
Talked to Nick a bit about this in person, I think the best solution here is to use a persistent notification that the Android system offers. For that, we'll need an icon (we can use our current firefox 1 tone icon), a title and a subtitle. +------------------------------------------------+ | | | +-+ Sign in to continue syncing | | +-+ Your account is no longer supported | | | +------------------------------------------------+
Flags: needinfo?(alam)
^ oops convo got crossed! that's for bug 1220904 and I'll move it there For this bug, I also just talked to Nalexander and I don't think we need additional messaging here. This use case is very intentional and we're doing the right thing by clearing their stuff on the remote device. I think adding a messaging somewhere could possibly even confuse things so I'm not too worried about it.
The underlying issue is that you can have an Android Account that is trying to connect to a deleted Firefox Account. Per antlam's feedback, there's no product desire to explicitly message (in the Firefox Settings menu, or in the Status Activity) that the FxA has been removed, so we could go ahead with just removing the Firefox Account. I believe the fxa-auth-server will respond to the FxA login state machine trying to sign its certificate with a clear error code if the remote Firefox Account has been deleted. We should be able to surface this easily, and then dispatch a PendingIntent to delete the Android Account. The reason for a pending intent is that I'd be scared of deleting an Android Account from _within_ a SyncAdapter.
I'm curious, what's the difference between an Android Account and a Firefox Account?
(In reply to Kit Cambridge [:kitcambridge] (He/him; UTC-8) from comment #11) > I'm curious, what's the difference between an Android Account and a Firefox > Account? An Android Account (see https://developer.android.com/reference/android/accounts/AccountManager.html) is the representation of an account (Gmail, Facebook, Dropbox, Firefox) owned and operated by Android. It integrates with the system, providing authorization tokens, connecting to the Android SyncAdapter system, etc. An Android Account registration needs to track the lifecycle of a remote Firefox Account "in code"; hence this ticket. (Historically, this wasn't necessary: Firefox Sync accounts never went away!)
(In reply to Nick Alexander :nalexander from comment #10) > I believe the fxa-auth-server will respond to the FxA login state machine > trying to sign its certificate with a clear error code if the remote Firefox > Account has been deleted. We should be able to surface this easily, and > then dispatch a PendingIntent to delete the Android Account. Seems like this could be done with minimal changes; let's do it. I like the idea of surfacing some kind of a notification saying that "your account has been deleted remotely", but if antlam doesn't seem it's necessary, or there's a chance we might confuse users (more so than deleting an account without telling them anything), I'm happy to skip that bit for now. > The reason for a pending intent is that I'd be scared of deleting an Android > Account from _within_ a SyncAdapter. That does sound mildly terrifying. I wonder what will happen!
Priority: P5 → P3
Component: Android Sync → Firefox Accounts
Product: Android Background Services → Firefox for Android
Version: Firefox 29 → 29 Branch
Re-triaging per https://bugzilla.mozilla.org/show_bug.cgi?id=1473195 Needinfo :susheel if you think this bug should be re-triaged.
Priority: P3 → P5
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.