Closed Bug 1892304 Opened 6 months ago Closed 5 months ago

Include the FxA uid as an optional meta property to the BackupManifest v1 schema

Categories

(Firefox :: Profile Backup, task, P3)

task

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: mconley, Assigned: mconley)

References

Details

(Whiteboard: [fidefe-device-migration])

Attachments

(1 file)

markh pointed out that it'd be good future-proofing to include the FxA uid inside of the backup-manifest.json.

The meta property seems like a good place to tuck this in. It should be an optional property, since not all users will be signed in at backup time.

Since we haven't shipped this thing yet, we don't need to do a schema version bump or anything special.

Here's one way to get the FxA sign-in state and uid:

const { UIState } = ChromeUtils.importESModule(
  "resource://services-sync/UIState.sys.mjs"
);
let fxaState = UIState.get();
if (fxaState.status == UIState.STATUS_SIGNED_IN) {
  let uid = fxaState.uid;

  // Poke uid into manifest object here
}

Is that the best way, markh?

Flags: needinfo?(markh)

That seems perfect, thanks. As mentioned in slack, you should also find an email property on that fxaState object, so including that also couldn't hurt if there's a possibility we want to show that account info to the user.

Flags: needinfo?(markh)
Blocks: 1885955
No longer blocks: 1885369
Assignee: nobody → mconley
Pushed by mconley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/df6b9812d5f5 Add the FxA uid and email to the backup manifest if signed in when creating a backup. r=backup-reviewers,kpatenio
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
Regressions: 1894301
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: