Closed
Bug 1254640
Opened 9 years ago
Closed 8 years ago
Add fxaDeviceId to Fennec's Sync client record
Categories
(Firefox for Android Graveyard :: Firefox Accounts, defect)
Firefox for Android Graveyard
Firefox Accounts
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1250782
People
(Reporter: nalexander, Unassigned)
References
Details
To help older clients migrate forward to FxA-authoritative client records, we'd like to start including the "fxaDeviceId" in our Sync client records.
In Fennec, these are produced at https://dxr.mozilla.org/mozilla-central/source/mobile/android/services/src/main/java/org/mozilla/gecko/sync/stage/SyncClientsEngineStage.java#373. This ticket tracks adding "getDeviceId" to https://dxr.mozilla.org/mozilla-central/source/mobile/android/services/src/main/java/org/mozilla/gecko/sync/delegates/ClientsDataDelegate.java?case=true&from=ClientsDataDelegate.java#7.
That device ID should be the Gecko profile ID for the "default" profile. (Sync always syncs against the "default" profile name.) The profile/client ID is exposed at https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/GeckoProfile.java#620.
This ticket may be tricky because the services code may not have access to the GeckoProfile class! I may have to do some work to unblock that.
Reporter | ||
Comment 1•9 years ago
|
||
(In reply to Nick Alexander :nalexander from comment #0)
> To help older clients migrate forward to FxA-authoritative client records,
> we'd like to start including the "fxaDeviceId" in our Sync client records.
>
> In Fennec, these are produced at
> https://dxr.mozilla.org/mozilla-central/source/mobile/android/services/src/
> main/java/org/mozilla/gecko/sync/stage/SyncClientsEngineStage.java#373.
> This ticket tracks adding "getDeviceId" to
> https://dxr.mozilla.org/mozilla-central/source/mobile/android/services/src/
> main/java/org/mozilla/gecko/sync/delegates/ClientsDataDelegate.
> java?case=true&from=ClientsDataDelegate.java#7.
>
> That device ID should be the Gecko profile ID for the "default" profile.
> (Sync always syncs against the "default" profile name.) The profile/client
> ID is exposed at
> https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/java/org/
> mozilla/gecko/GeckoProfile.java#620.
markh points out I made an error here. The device ID comes from the /device API. I meant for the Gecko profile ID to be the identifier given to the /device API to try to de-duplicate devices/profiles. That changes the implementation strategy for this ticket.
Comment 2•9 years ago
|
||
Hi Nick,
I could not understand your last comment, you mean that the id should come from a call to:
GET /v1/account/devices [1]
And use the id associated to the current device?
[1] https://github.com/mozilla/fxa-auth-server/blob/master/docs/api.md#get-v1accountdevices
Flags: needinfo?(nalexander)
Comment 3•9 years ago
|
||
(In reply to Francisco Jordano [:arcturus] [:francisco] from comment #2)
> Hi Nick,
>
> I could not understand your last comment, you mean that the id should come
> from a call to:
>
> GET /v1/account/devices [1]
The device ID will come from a POST to that endpoint - if you don't specify an ID one is assigned and returned - see the docs just a little earlier in the link you referenced.
> And use the id associated to the current device?
There was some discussion around a de-duping ID, but Nick and I both recently discovered it hasn't yet been implemented, so I think for now we can ignore that part.
Flags: needinfo?(nalexander)
Comment 4•9 years ago
|
||
> I meant for the Gecko profile ID to be the identifier given to the /device API
> to try to de-duplicate devices/profiles
The FxA devices API doesn't support that, yet. I've got an open issue on the design aspects of it that I'd be happy to pick up again without input from the client side:
https://github.com/mozilla/fxa-auth-server/issues/1077
Reporter | ||
Comment 5•9 years ago
|
||
(In reply to Francisco Jordano [:arcturus] [:francisco] from comment #2)
> Hi Nick,
>
> I could not understand your last comment, you mean that the id should come
> from a call to:
>
> GET /v1/account/devices [1]
>
> And use the id associated to the current device?
>
> [1]
> https://github.com/mozilla/fxa-auth-server/blob/master/docs/api.md#get-
> v1accountdevices
Francisco -- sorry to be so long replying here, I lost track of this ticket. As in c#3, yes -- the ID will be determined by the server and returned in a POST to /v1/account/devices.
I hope to spend some time working on this in the next week or so, and will update the ticket as I do. Sorry for the delayed reply!
Reporter | ||
Comment 6•8 years ago
|
||
This has been implemented in Bug 1250782, and made real in Bug 1287643. Thanks, eoger!
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•