Open Bug 1256459 Opened 10 years ago Updated 3 years ago

Refactor FxAccounts to better reflect client states

Categories

(Firefox :: Firefox Accounts, defect, P3)

defect

Tracking

()

People

(Reporter: markh, Unassigned)

References

Details

The state management in FxAccounts is ad-hoc and thus error prone. This leads us to bugs like bug 1254810 which reflects confusion about what data is valid and what data should be discarded under some error situations. We should refactor this to reflect https://wiki.mozilla.org/User_Services/Sync/FxA_Client_States. Off the top of my head, we could consider: * Change getSignedInUser() to only return (say) email and uid fields. This then remains the "is a user logged in?" entry-point. * Add a new entry-point that is used to get named field(s) for the signed in user (ie, the caller must specify exactly which fields they care about). * An internal state machine and mapping of field names to states. * Thus, callers don't need to know about these states - FxAccounts will automatically transition through the relevant states to obtain the requested data.
Flags: firefox-backlog+
Priority: -- → P3
See Also: → 1189148
Blocks: 1274150
Priority: P3 → P2
Priority: P2 → P3
See Also: → 966517
Product: Core → Firefox
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.