Closed Bug 905637 Opened 8 years ago Closed 8 years ago

[User Story] Firefox Account in Settings


(Firefox OS Graveyard :: Gaia::System, defect)

Gonk (Firefox OS)
Not set



feature-b2g 2.0


(Reporter: pdol, Assigned: sergi)



(Keywords: feature, Whiteboard: [ucid:FxA3, 1.4:p2, ft:systems-fe][qa+],[dependency:Marketplace])


(2 files, 2 obsolete files)

User Story:

As a user, I want to be able to set up a Firefox account or login using an existing Firefox or Persona account from the Settings menu so that I can chose to do this after the First Run Experience, giving me the freedom of choice and making it easy to create an account when I chose.

Acceptance Criteria:

1. If I do not currently have a Firefox or Persona account, I can create one under Settings and I will be signed in using it.
2. If I already have a Firefox or Persona account, I can log in under Settings using this account using my email address and password.
3. If I already have a Firefox or Persona account, but I have forgotten the password, I am able to reset my password in Settings by having an email sent to me with a link to reset my password.  
4. Once my password is reset (via the sent email), I can enter my Firefox or Persona email/password and am logged in.
5. If I am already logged in to a Firefox or Persona account, I can log out should I chose, preventing apps from logging me in with this identity until I re-log in.
6. If my device drops connectivity while in the process of creating an account/signing in, I am made aware the of the lack of connectivity and asked to try again later.
UX proposal spec for this feature attached.
Whiteboard: [ucid:System3] → [ucid:System3][systemsfe]
Assignee: nobody → sergi.mansilla
No longer depends on: 929388
Attached file WIP update to Settings Flow (obsolete) —
Attached file FxA_Settings_2013_30_13_v.4.pdf (obsolete) —
Attachment #822290 - Attachment is obsolete: true
Fixes a few typographic + formatting errors in previous. Adds errors.
Attachment #825050 - Attachment is obsolete: true
Whiteboard: [ucid:System3][systemsfe] → [ucid:System3][systemsfe][qa+]
Flags: in-moztrap?(edwong)
Whiteboard: [ucid:System3][systemsfe][qa+] → [ucid:FxA3, 1.4:p2][systemsfe][qa+]
Update whiteboard tag to follow format [ucid:{id}, {release}:p{1,2}, ft:{team-id}]
Whiteboard: [ucid:FxA3, 1.4:p2][systemsfe][qa+] → [ucid:FxA3, 1.4:p2, ft:systems-fe][qa+]
I am starting on this, assuming the fxa_iac_helper[1] is available to the settings app (same assumption as [3]), and using sergi's preliminary settings app work[2] and shane's work integrating FTU and iac_helper[3] to guide me. If anyone wants to follow along, I'll keep my work in this branch:

[1] the file shared/js/fxa_iac_client.js in

Procedural questions for Sam: should I file a separate bug for the actual dev work, to keep the user story bug clean? Is this user story bug going to be replaced with a bug from a new tree?
Flags: needinfo?(spenrose)
In my branch, I've merged [1] and [2] from my previous comment, and I am able to run this patched gaia on 12-18-2013 nightly, now that ferjm's fxa patches have landed.

Another question for sam or ferjm (since sam's sick and ferjm's touched gecko pieces) - From looking at the specs, it seems like we really need a locally-cached copy of the FxA account info when the settings app starts up. Is this cache in the fxa gecko code somewhere? If so, how can we ensure it's warmed (to avoid weird UI states where we don't have data and are waiting for slow networks)?

Also, if the user doesn't yet have an account, how/where should the settings app listen for "logged-in" events (in case the user creates an FxA account inside Marketplace, or something)?
Flags: needinfo?(ferjmoreno)
Jared, I apologize, I haven't cleaned this up as aggressively as I should. This is now superseded by the equivalent bug in the 1.4 tree: . C.f. 930074 and the whole tree at
Flags: needinfo?(spenrose)
Flags: needinfo?(ferjmoreno)
In answer to Comment #8, services/fxaccounts/FxAccounts.jsm saves the logged-in user locally ("signedInUserStorage"). There is an onlogin event, and I think you are correct that we will need to listen for it, but we should take a closer look.
Actually, the cache for the signed-in user that the Settings app will be consuming is handled by FxAccountsManager [1], which also does the appropriate email verification check if needed. The Settings app just needs to use the FxAccountsIACHelper.getAccounts function. The platform will make sure that the account information is correct and updated.

> Also, if the user doesn't yet have an account, how/where should the settings
> app listen for "logged-in" events (in case the user creates an FxA account
> inside Marketplace, or something)?

This is a very good point! We should allow consumers of FxAccountsIACHelper to listen for 'onlogin' and 'onverified' events. I'll file a bug for it. Thanks!

Flags: in-moztrap?(edwong)
Whiteboard: [ucid:FxA3, 1.4:p2, ft:systems-fe][qa+] → [ucid:FxA3, 1.4:p2, ft:systems-fe][qa+],[dependency:Marketplace]
Hmm, not sure why this bug is still open. Closing as a dupe of 949051.
Closed: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 949051
feature-b2g: --- → 2.0
You need to log in before you can comment on or make changes to this bug.